Skip to content

feat(mcp): log one line per MCP tool call with runtime and tool-call counts - #37

Merged
fforres merged 1 commit into
direct-invokefrom
execution-observability
Oct 22, 2026
Merged

fforres merged 1 commit into
direct-invokefrom
execution-observability

Conversation

@fforres

@fforres fforres commented Oct 22, 2026

Copy link
Copy Markdown

What changes for users

Nothing visible. Operators get one log line per MCP tool call in Workers Observability: executor mcp tool call. Today there is no per-execution signal there, so we cannot tell which calls create billed Dynamic Workers, from which client, or whether an execute only did discovery.

Fields

tool (execute, invoke, execute_action, search_namespace, resume), runtime (direct, dynamic-worker, quickjs, none), mode (passthrough, code), client (MCP clientInfo name/version), toolCalls (connected tool calls), discoveryOnly (an ok execute that called no connected tool), codeLength, durationMs, outcome (ok, tool_error, error, paused). Arguments, code, results and secrets are never logged.

apps/host-cloudflare reports dynamic-worker when the LOADER binding exists and quickjs otherwise, using the same check that picks the code executor.

Tests

tool-call-log.test.ts (7): invoke logs runtime: direct with no arguments or results; failed ToolResult logs tool_error; discovery-only execute; connected tool-call counting without logging code; failed/thrown/paused outcomes; resume; engine failure. mcp 264/264, host-cloudflare 156/156.

Stacked on #36.

…counts

execute, invoke, execute_action, search_<integration> and resume now emit
one "executor mcp tool call" info line when they finish, with the tool,
the runtime that ran it (dynamic-worker, quickjs, sandbox, direct, or none),
the MCP client name/version, the number of connected tool calls, whether an
execute only did discovery, the code length, the duration, and the outcome.
It never logs arguments, code, results, or secrets. The Cloudflare host
reports dynamic-worker or quickjs, matching the code executor it picks.
@fforres
fforres merged commit 76e517f into direct-invoke Oct 22, 2026
1 of 37 checks passed
@fforres
fforres deleted the execution-observability branch October 22, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant