Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): MCP tool schemas drop JSON noise #25018

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromfeat/mcp-schema-noiseopened View on GitHub

Showing 4 changed files with 112 additions and 2 deletions (loading 1).

x
0 of 4 viewed, 4 left
3 additions and 2 deletionsapps/server/src/mcp/McpHttpServer.tsModified
View file
@@ -35,6 +35,7 @@
MAX_REPORTED_DEPTH,
toolOutcome,
} from "../telemetry/ProviderDimensions.ts";
+import { advertisedJsonSchema } from "./advertisedJsonSchema.ts";
import * as McpInvocationContext from "./McpInvocationContext.ts";
import * as McpToolAccess from "./McpToolAccess.ts";
import * as OrchestratorMcpService from "./OrchestratorMcpService.ts";
@@ -448,7 +449,7 @@
tool: new McpSchema.Tool({
name: tool.name,
description: Tool.getDescription(tool),
- inputSchema: Tool.getJsonSchema(tool),
+ inputSchema: advertisedJsonSchema(tool),
annotations: {
...Context.getOption(tool.annotations, Tool.Title).pipe(
Option.map((title) => ({ title })),
@@ -632,7 +633,7 @@
tool: new McpSchema.Tool({
name: tool.name,
description: Tool.getDescription(tool),
- inputSchema: Tool.getJsonSchema(tool),
+ inputSchema: advertisedJsonSchema(tool),
annotations: {
...Context.getOption(tool.annotations, Tool.Title).pipe(
Option.map((title) => ({ title })),