Builtin Library
README.md
mcpLog Module
Public Luau surface over the __mcpLog Internal FFI namespace —
read-only ring buffer of MCP tool-call entries.
Purpose
Wrap the raw __mcpLog.* FFI namespace in a typed Luau table that gets
auto-injected as _G.mcpLog via the prelude. The in-engine "MCP" panel
polls mcpLog.query() every frame and renders the returned array of
structured tool-call rows.
Usage
-- Pull the most recent 50 calls
for _, entry in ipairs(mcpLog.query(50)) do
print(entry.tool_name, entry.status, entry.duration_ms)
end
-- Full ring (up to 500 entries)
local all = mcpLog.query()
-- Drop everything
mcpLog.clear()
Exports
mcpLog.query(limit?) -> { McpLogEntry }— newest-last array of entries.mcpLog.clear() -> boolean— drop all entries.