Repository navigation
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workingfix proposedBot has a verified fix diff in the commentBot has a verified fix diff in the commentready for workEnough information for someone to start working onEnough information for someone to start working on
Description
Describe the bug
When you pass properties in the arguments of a tools/call message that are not defined in the schema, these are silently dropped from the args object.
To Reproduce
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
const echoServer = new McpServer({
name: "Echo",
version: "1.0.0",
});
const schema = {
message: z.string().describe("the message to echo"),
};
echoServer.tool("echo", "Echos the input message back", schema, async (args) => {
console.log({ args });
return { content: [{ type: "text", text: `Echo: ${props.message}` }] };
});Call the echo tool with e.g.
{
"method": "tools/call",
"params": {
"name": "echo",
"arguments": {
"message": "bar"
"other": "foo"
},
"_meta": {
"progressToken": 0
}
}
}
args will be { message: "bar" }
Expected behavior
It should be possible to pass additional properties to the tool.
This is the JSON Schema generated on the server, by default additionalProperties is set to true.
{
"tools": [
{
"name": "echo",
"description": "Echos the input message back",
"inputSchema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "the message to echo"
}
},
"required": [
"message"
],
"additionalProperties": true,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
]
}Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingSomething isn't workingfix proposedBot has a verified fix diff in the commentBot has a verified fix diff in the commentready for workEnough information for someone to start working onEnough information for someone to start working on
Activity
uncomplexity commentedon Mar 11, 2025
Also how do we provide description to each tool?
felixweinberger commentedon Oct 24, 2025
Hi @au-re thanks for this report, apologies for the time it took to get back to this - is this still an issue for you?