fix(mcp): align runtime unknown argument validation

This commit is contained in:
morluto
2026-07-16 19:51:25 +08:00
parent 8a1c128b67
commit d1e72207f4
3 changed files with 26 additions and 2 deletions
+22
View File
@@ -629,6 +629,28 @@ describe("enhanced MCP tools", () => {
},
},
});
const nestedMisspelled = await client.callTool({
name: "analyze_function",
arguments: {
procedure: "0x1",
collection_offset: { commentz: 1 },
},
});
expect(nestedMisspelled).toMatchObject({
isError: true,
structuredContent: {
error: {
details: {
issues: [
{
path: ["collection_offset", "commentz"],
reason: "unknown_argument",
},
],
},
},
},
});
const bounded = await client.callTool({
name: "trace_feature",
arguments: { query: "needle", max_operations: 101 },