logoalt Hacker News

wild_eggyesterday at 11:52 PM3 repliesview on HN

Deferred tool loading is not part of MCP. It's a Claude API special parameter that most other LLM APIs do not support.


Replies

red_haretoday at 3:59 AM

OpenAI API also supports defer_loading https://developers.openai.com/api/docs/guides/tools-tool-sea...

And it's not actually necessary for it to exist at the API level. It's a pattern. Making it API-side is just an optimization.

To do it client-side: 1. Define a single tool, tool_search 2. List the names of your deferred tools in context (or tool_search's description) 3. When tool_search is called, match the query against the tool names (or names + descriptions) 4. Append the matched tool def to the context in a new <system>-esque tag

Claude Code (as of the leak) does this client side. You can even see the custom matching function and A/B tests about whether to include the descriptions.

Whether or not that tool definition comes from MCP or a local definition is kind of beside the point.

BeetleBtoday at 4:06 AM

On the flip side, Claude is at fault in not letting you choose which tools on which MCP servers to keep in context. When I first starting using MCP about a year ago (not on Claude Code), my tools actually let me selectively turn on/off individual tools.

Crazy that the company that invented MCP is not putting basic features like this in the product.

show 1 reply
didibustoday at 5:38 AM

Deferred cli/skill loading is also not part of CLIs or skills, it's all about how the coding agent/harness is implemented.