Repository navigation
Replies: 3 comments
|
Measured data point supporting this proposal (fresh
The pattern: the server inlines usage playbooks into descriptions/input schemas, so a single tool can carry more bytes than an entire typical server. With it mounted, DSH reported ~200k tokens of resident context before the first user message; unmounting it dropped that to ~10k (remaining law-search MCP servers). Two notes relative to the proposal:
|
|
Same issue here. Currently I choose to switch to Codex for any tasks that need MCP servers. |
|
Supporting measurement from a different route, plus one sequencing note. Environment: desktop Measured in one real session (numbers decoded from the session log's
Two things this adds to the proposal:
Sequencing. #9143 shows +1 from a daily MCP-heavy profile — this is the single largest lever on per-request cost we have. |
Uh oh!
There was an error while loading. Please reload this page.
Motivation
dsh-mcp-clientregisters every discovered MCP tool eagerly (ctx.tools.register(definition)insrc/index.ts), so all tool descriptions and input schemas ride on every model request. A single MCP gateway scope can easily expose 50–100 tools; at ~100–400 tokens per schema this adds 15k–30k tokens per request before the conversation starts, and dominates cost for deployments that mount several servers/scopes.The Harness already has the equivalent infrastructure — it is just not wired into MCP (verified on the 0.2.0-rc.2 desktop runtime):
@deepseek-ai/dsh-toolsaccepts adeferLoadingflag on registered definitions;@deepseek-ai/dsh-llm/dsh-llm-deepseekproject it to provider-sidedefer_loading: trueand handle mid-conversationtool-additiondeveloper messages;@deepseek-ai/dsh-llm-pi-ai's compat gate already containssupportsToolSearch,supportsMidConvoToolAdditions,supportsMidConvoToolChanges— currently allwithhold.Behavior
Please consider:
dsh-mcp-clientconfig field such astoolMode: "eager" | "deferred", so a server's tool schemas are withheld until the model first references or searches for them (tool-search style), leveraging the existingdeferLoadingpipeline instead of putting every MCP schema in every request.includeTools/excludeToolsallowlist would already let deployments trim the largest schemas without disabling an entire server.mcp__<server>__<tool>naming, whole-generation atomic swap, and KV-cache-stable prefixes when the tool set is unchanged.All reactions