Skip to content

fix(mcp): fit deploy_local_agent and get_objectives inside Claude Code's 2,048-char description cap (#3234) - #3238

Merged
vybe merged 1 commit into
devfrom
fix/3234-mcp-description-cap
Oct 5, 2026
Merged

vybe merged 1 commit into
devfrom
fix/3234-mcp-description-cap

Conversation

@dolho

@dolho dolho commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Claude Code shows a model only the first 2,048 characters of an MCP tool description and appends "… [truncated]". Parameter descriptions are not cut. The server publishes the full text, so nothing on Trinity's side showed that two descriptions were losing their tails.

Tool Before After How
deploy_local_agent 2,698 1,477 Moved the four packaging steps, including the manifest script, into the archive parameter description. Steps 1–2 are byte-identical (checked by importing both versions). The description keeps the rules up front: package with a manifest first, MANIFEST_DRIFT, the token ceiling and the CLI escape.
get_objectives 2,349 2,034 This tool has no parameters, so there's nowhere to move detail. I tightened the wording instead and dropped no instruction. "stale: true means DO NOT ACT" now comes right after the purpose, so the action rule survives any cut.

Test

src/mcp-server/src/tool-description-budget.test.ts runs a real createServer and a user-scoped key, and lists the tools over the streamable-HTTP transport (the access-wiring.test.ts shape).

  • It fails naming every published tool over 2,048 characters, with each tool's length.
  • It also asserts that more than 100 tools are listed and that both of this issue's tools are present, so a shrunken listing can't pass by accident.
  • It was red before the fix, listing deploy_local_agent: 2698, chat_with_agent: 2424 and get_objectives: 2349.

chat_with_agent (2,424) is a shrink-only PENDING entry owned by abilityai/trinity-enterprise#568.

  • ent#568 is claimed and in progress, and it rewrites that description (the delegation contract), so editing it here would collide with that work.
  • The entry can't grow.
  • The test fails once chat_with_agent fits the cap, so the entry gets removed in that PR.

Verification

  • npm test (MCP server): 683/683 pass.
  • tsc --noEmit: clean.
  • The existing description pins in agents.deploy.test.ts and metrics.test.ts still pass unchanged.

Fixes #3234

🤖 Generated with Claude Code

…e's 2,048-char description cap (#3234)

Claude Code shows a model only the first 2,048 characters of an MCP tool
description. The server publishes the full text, so the cut tails were
invisible from Trinity's side.

- deploy_local_agent (2,698 -> 1,477): the four packaging steps,
  including the manifest script, move into the `archive` parameter,
  whose description is not cut. Steps 1-2 are byte-identical to before.
  The description keeps the rules up front.
- get_objectives (2,349 -> 2,034): this tool has no parameter to carry
  detail, so the wording is tightened instead with no instruction
  dropped. "stale: DO NOT ACT" now comes right after the purpose.
- tool-description-budget.test.ts: a real createServer, a user-scoped
  key and tools/list over streamable HTTP. It fails naming every
  published tool over the cap with its length. chat_with_agent (2,424)
  is a shrink-only PENDING entry owned by Abilityai/trinity-enterprise#568,
  which is rewriting it; the entry fails once that tool fits.

Fixes #3234

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge-train: batch validated on train/20261005-1731 (#3251)

@vybe
vybe merged commit f178f06 into dev Oct 5, 2026
22 checks passed
vybe added a commit that referenced this pull request Oct 5, 2026
…3234, Abilityai/trinity-enterprise#568)

#3238 landed the all-tools description budget test with chat_with_agent pinned
as PENDING at 2,424 characters. This branch brings it to 1,940, and the test
fails an entry that fits the cap, so the entry goes with the fix that shortened
it. Mechanical, per the merge-train note on the PR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants