modelcontextprotocol / modelcontextprotocol/typescript-sdk
invalid argument should throw protocol error, rather than tool execution error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.4k
- Forks
- 2.2k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 4
Description
Describe the bug
According to the spec , invalid tool arguments should result in a protocol error. However, the server currently returns a tool execution error instead.
To Reproduce
Steps to reproduce the behavior:
- Call a tool with arguments that violate the MCP schema.
- Observe the returned error type.
Expected behavior
A protocol error should be returned for schema validation failures.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the TypeScript server's tool-call handling and the schema validation path. Compare the current error classification with the MCP error-handling specification, then verify that arguments violating the tool schema return a protocol error rather than a tool execution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 63/100