modelcontextprotocol / modelcontextprotocol/typescript-sdk

invalid argument should throw protocol error, rather than tool execution error

Open
#2,162 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug potentially close
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:

  1. Call a tool with arguments that violate the MCP schema.
  2. Observe the returned error type.

Expected behavior
A protocol error should be returned for schema validation failures.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.