Skip to content

Commit eaed4a0

Browse files
committed
fix(evals): grade T3 tool inputs with the server's JSON codec
1 parent 5a0fe5b commit eaed4a0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎evals/mcp-tool-use/run.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,13 @@ const t3SourceTools: ReadonlyArray<Tool.Any> = [
368368
DeviceToolkit,
369369
HtmlToolkit,
370370
].flatMap((toolkit): ReadonlyArray<Tool.Any> => Object.values(toolkit.tools));
371-
// T3 decodes arguments with each tool's schema, which drops keys the tool does not declare.
371+
// McpHttpServer decodes arguments with each tool's JSON codec, which drops undeclared keys.
372372
const t3InputDecoders = new Map(
373373
t3SourceTools.map((tool) => [
374374
tool.name,
375-
Schema.decodeUnknownOption(tool.parametersSchema as Schema.Codec<unknown, unknown>),
375+
Schema.decodeUnknownOption(
376+
Schema.toCodecJson(tool.parametersSchema as Schema.Codec<unknown, unknown>),
377+
),
376378
]),
377379
);
378380
const t3Tools: ReadonlyArray<ApiTool> = t3SourceTools.map((tool) => ({

0 commit comments

Comments
 (0)