Skip to content

Name the SDK rejection in MCP invocation defects - #2014

Merged
RhysSullivan merged 2 commits into
mainfrom
mcp-invocation-cause-observability
Sep 16, 2026
Merged

RhysSullivan merged 2 commits into
mainfrom
mcp-invocation-cause-observability

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Follow-up to #2012. A tools/call rejection that is neither an HTTP auth failure nor a JSON-RPC error still scrubs to Internal tool error [id], and the defect log for that id only says MCP tool call failed for <tool>. Today that made a live customer failure untraceable from Axiom.

  • McpInvocationError now carries sdkFailure: { name, code } (the SDK error class and its stable SdkErrorCode / ProtocolErrorCode / HTTP status) and includes both in its message, which is what the defect log renders.
  • Structural only: the SDK message is never copied, so a transport error that embeds an upstream body still cannot leak.

Verified with the MCP plugin unit tests, typecheck, and lint.

🤖 Generated with Claude Code

An MCP tools/call rejection that is neither HTTP auth nor a JSON-RPC
error reaches the dispatch defect log as "MCP tool call failed for
<tool>" and nothing else, so an opaque correlation id cannot be traced
to a cause. Carry the SDK error class and stable code on
McpInvocationError and in its message. Structural only; the SDK message
is never copied, since a transport message can embed an upstream body.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 15, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud a6b38df Sep 16 2026, 12:03 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 15, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing a6b38df Commit Preview URL

Branch Preview URL
Sep 16 2026, 12:02 AM

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Sep 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@2014

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@2014

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@2014

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@2014

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@2014

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@2014

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@2014

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@2014

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@2014

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@2014

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@2014

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@2014

executor

npm i https://pkg.pr.new/executor@2014

commit: a6b38df

@RhysSullivan
RhysSullivan marked this pull request as ready for review September 15, 2026 23:59
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@RhysSullivan
RhysSullivan merged commit f94e5e0 into main Sep 16, 2026
44 checks passed
@RhysSullivan
RhysSullivan deleted the mcp-invocation-cause-observability branch September 16, 2026 00:12
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