typescript-sdk/.changeset/fix-unknown-tool-protocol-error.md
Felix Weinberger 1823aae891
Implement MCP 2026-07-28 (#2286)
Co-authored-by: Matt <77928207+mattzcarey@users.noreply.github.com>
Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-26 14:01:10 +01:00

656 B

@modelcontextprotocol/core-internal @modelcontextprotocol/server
minor major

Fix error handling for unknown tools and resources per MCP spec.

Tools: Unknown or disabled tool calls now return JSON-RPC protocol errors with code -32602 (InvalidParams) instead of CallToolResult with isError: true. Callers who checked result.isError for unknown tools should catch rejected promises instead.

Resources: Added ProtocolErrorCode.ResourceNotFound (-32002) as receive-tolerated vocabulary. The wire code emitted for an unknown resources/read URI is -32602 (Invalid Params) — see the resource-not-found-32602 changeset.