feat(mcp): add typed bounded analysis tools

This commit is contained in:
morluto
2026-07-12 18:59:53 +08:00
parent 7e4ae21d78
commit 893d2e2d05
16 changed files with 509 additions and 100 deletions
+7 -1
View File
@@ -32,12 +32,18 @@ const registerEnhancedTool = (
const name = enhancedToolNameSchema.parse(contract.name);
server.registerTool(
name,
{ description: contract.description, inputSchema: contract.inputSchema },
{
description: contract.description,
inputSchema: contract.inputSchema,
outputSchema: contract.outputSchema,
annotations: contract.annotations,
},
async (input, context) =>
toCallToolResult(
await logToolExecution(logger, name, () =>
services.execute(name, input, context.mcpReq.signal),
),
contract,
),
);
};