You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently standardSchemaToJsonSchema() is called lazily inside the tools/list request handler (mcp.ts:145, 153), re-converting every tool's schema on every list request.
Moving this to registerTool() / registerPrompt() time and caching the JSON Schema result on RegisteredTool/RegisteredPrompt would:
Avoid re-converting identical schemas on every tools/list call
Match Go SDK and fastmcp, which both process schemas at registration time
Scope: registerTool, registerPrompt, the tools/list and prompts/list handlers, and RegisteredTool.update() / RegisteredPrompt.update() (need to re-convert when schema changes).
Currently
standardSchemaToJsonSchema()is called lazily inside thetools/listrequest handler (mcp.ts:145, 153), re-converting every tool's schema on every list request.Moving this to
registerTool()/registerPrompt()time and caching the JSON Schema result onRegisteredTool/RegisteredPromptwould:tools/listtools/listcallScope:
registerTool,registerPrompt, thetools/listandprompts/listhandlers, andRegisteredTool.update()/RegisteredPrompt.update()(need to re-convert when schema changes).Related: #1563 (where this came up)