From 4744d563c37930c08d7940f3bf52dd88089f21f4 Mon Sep 17 00:00:00 2001 From: alu Date: Mon, 23 Feb 2026 16:11:25 -0800 Subject: [PATCH 1/2] fix: tools-call-simple-text now fails when tool returns isError: true --- src/scenarios/server/tools.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scenarios/server/tools.ts b/src/scenarios/server/tools.ts index 7ecbfdd5..bfb40b4e 100644 --- a/src/scenarios/server/tools.ts +++ b/src/scenarios/server/tools.ts @@ -127,6 +127,8 @@ Implement tool \`test_simple_text\` with no arguments that returns: // Validate response const errors: string[] = []; + if ((result as any).isError === true) + errors.push('Tool returned an error instead of content'); const content = (result as any).content; if (!content) errors.push('Missing content array'); if (!Array.isArray(content)) errors.push('content is not an array'); From 3af5ac47211d3de46b9ea6c2c2f21a7c552eb5b0 Mon Sep 17 00:00:00 2001 From: alu Date: Sun, 19 Apr 2026 13:07:12 -0700 Subject: [PATCH 2/2] 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. --- src/scenarios/server/tools.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/scenarios/server/tools.ts b/src/scenarios/server/tools.ts index bfb40b4e..5431be72 100644 --- a/src/scenarios/server/tools.ts +++ b/src/scenarios/server/tools.ts @@ -121,8 +121,14 @@ Implement tool \`test_simple_text\` with no arguments that returns: const connection = await connectToServer(serverUrl); const result = await connection.client.callTool({ - name: 'test_simple_text' - /* omit arguments as it is not required in the schema */ + name: 'test_simple_text', + // Per MCP spec, `arguments` is optional when the tool's inputSchema + // has no required fields. But the typescript-sdk server (<= 1.29.x) + // rejects undefined `arguments` against any inputSchema, returning + // isError: true. Fix merged into main (PR #1404) but not backported + // to the 1.x line — see modelcontextprotocol/typescript-sdk#1869. + // Passing `{}` explicitly until the fix is released. + arguments: {} }); // Validate response