| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
🦋 Changeset detectedLatest commit: b3635b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sorry, something went wrong.
|
@modelcontextprotocol/client
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1389
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1389
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1389
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1389
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1389 commit: 502e046 |
Sorry, something went wrong.
|
I've resolved merge conflicts that emerged since I submitted this. It would be nice to get this reviewed and merged soon before more conflicts emerge. |
Sorry, something went wrong.
The error message differs depending on the environment.
|
Pushing a fix to resolve merge conflicts - thanks for this submission. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
While developing my Swift SDK for MCP, I encountered the following MCP spec compliance issues in the TypeScript SDK:
Tool Error Handling
When an unknown or disabled tool is called, it throws an McpError, which is caught and returned as a CallToolResult with isError: true.
The spec distinguishes between protocol errors and tool execution errors:
Protocol Errors:
Tool Execution Errors:
Protocol error example for unknown tool:
{ "jsonrpc": "2.0", "id": 3, "error": { "code": -32602, "message": "Unknown tool: invalid_tool_name" } }I moved the unknown/disabled tool checking to before the try/catch block so that these protocol errors propagate as JSON-RPC errors rather than being caught and returned as a CallToolResult.
Resource Error Handling
The spec also requires that unknown resources return error code -32002 (ResourceNotFound) rather than -32602 (InvalidParams). This PR adds ErrorCode.ResourceNotFound to the ErrorCode enum and updates the resource handler to use it.
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist