Skip to content

Commit 3af5ac4

Browse files
author
alu
committed
fix: pass empty arguments object in tools-call-simple-text scenario
The reference everything-server's zod schema rejects `undefined` arguments and requires at least `{}`, so omitting `arguments` caused the server to return `isError: true` with a validation error. This went unnoticed under the previous lenient check but is correctly flagged by the new `isError` assertion. Matches the convention used by every other tool-call scenario in this file.
1 parent cd062a6 commit 3af5ac4

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/scenarios/server/tools.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,14 @@ Implement tool \`test_simple_text\` with no arguments that returns:
121121
const connection = await connectToServer(serverUrl);
122122

123123
const result = await connection.client.callTool({
124-
name: 'test_simple_text'
125-
/* omit arguments as it is not required in the schema */
124+
name: 'test_simple_text',
125+
// Per MCP spec, `arguments` is optional when the tool's inputSchema
126+
// has no required fields. But the typescript-sdk server (<= 1.29.x)
127+
// rejects undefined `arguments` against any inputSchema, returning
128+
// isError: true. Fix merged into main (PR #1404) but not backported
129+
// to the 1.x line — see modelcontextprotocol/typescript-sdk#1869.
130+
// Passing `{}` explicitly until the fix is released.
131+
arguments: {}
126132
});
127133

128134
// Validate response

0 commit comments

Comments
 (0)