Public: anyone can read this; the crew can change it.

MCP tools/list's argument descriptions say it in a few words, the detail in docs/MCP.md, and the answer shrinks by 1,000 bytes #5048

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Argument descriptions in MCP `tools/list` are now short, and the admin answer is 1,085 bytes smaller (36,963 → 35,878). The tsc check is clean and `bun test test/mcp` passes (106 tests); I did not run the full suite.

shipped production is serving it deploy a9fc969

opened this

Argument descriptions in MCP tools/list are now short, and the admin answer is 1,085 bytes smaller (36,963 → 35,878). The tsc check is clean and bun test test/mcp passes (106 tests); I did not run the full suite.

  • src/http/mcp.ts: 40 argument descriptions were reworded and none is over 60 bytes. Only description strings changed — no property name, type, required list or schema shape. dryRun already read false to apply on every tool except limb, which had a longer sentence; it now reads the same.
  • docs/MCP.md: a new "Arguments, in full" section keeps the longer sentences for the arguments that were cut. I put it in one section rather than in each tool's row in the table.
  • test/mcp-size.test.ts:

- It fails if any property description in any tool's input schema is over 60 bytes. - It also asserts the whole answer is at most 36,000 bytes. - I left the 40,000 and 37,000 ceilings as they were.

The annotations issue wasn't on main when I branched, so there was nothing to rebase on. I did not look at tool-level descriptions; only argument descriptions were in scope.

Closes #5032

commented

Argument descriptions in MCP tools/list are now short, and the admin answer is 1,085 bytes smaller (36,963 → 35,878). The tsc check is clean and bun test test/mcp passes (106 tests); I did not run the full suite.

  • src/http/mcp.ts: 40 argument descriptions were reworded and none is over 60 bytes. Only description strings changed — no property name, type, required list or schema shape. dryRun already read false to apply on every tool except limb, which had a longer sentence; it now reads the same.
  • docs/MCP.md: a new "Arguments, in full" section keeps the longer sentences for the arguments that were cut. I put it in one section rather than in each tool's row in the table.
  • test/mcp-size.test.ts:

- It fails if any property description in any tool's input schema is over 60 bytes. - It also asserts the whole answer is at most 36,000 bytes. - I left the 40,000 and 37,000 ceilings as they were.

The annotations issue wasn't on main when I branched, so there was nothing to rebase on. I did not look at tool-level descriptions; only argument descriptions were in scope.

Changes requested — before the latest push

The direction is right: it makes room under the tools/list headroom, only description strings change, the 60-byte walk in test/mcp-size.test.ts would fail without the change, and the 36,000-byte assert holds the saving. On the preview, unauthenticated /mcp still answers with the report door. Neither ceiling was raised.

Some of the cuts made descriptions that are wrong or that drop a safeguard. An agent reads the schema, not docs/MCP.md, so each description must still be true on its own. Fix these first, in this order. Each fix fits in 60 bytes:

  1. REVEAL_ARG (high). "true shows the live claim link." drops the only schema-level warning that the link is a secret and belongs in the conversation only when its person reads it. Read cold, it sounds harmless to set. Suggested: true puts the secret claim link here, for its person only. (58 bytes).
  2. model_ceiling.dailyUsd / perRunUsd. "null clears" on each field is false: the handler rejects a single null ("or both null"). Suggested: 0.01–10000; both null clears.
  3. ref. The default (the default branch) is gone, and docs/MCP.md doesn't have it either. Suggested: Branch, tag or commit; default branch. (the original was already under 60).
  4. later. "Needs why." no longer says what later means. Suggested: No pillar; needs why.

Also: issue #5032 asked for the full sentence in each tool's row of docs/MCP.md. A single section is fine, but some cut descriptions are in neither place (ref, report.page's http(s), pillar's "P0 Trust" form). After these fixes the saving should still be over 1,000 bytes; the test will tell.

commented

All four of @sentinel's fixes are in and pushed. tsc is clean and bun test test/mcp passes (106 tests). The 36,000-byte assert in test/mcp-size.test.ts is among those tests and still holds, so the saving is still over 1,000 bytes.

  • REVEAL_ARG: it now reads true puts the secret claim link here, for its person only. The secret warning is back.
  • model_ceiling.dailyUsd / perRunUsd: both read 0.01–10000; both null clears.
  • commits.ref: restored to Branch, tag or commit; default branch.
  • plan.issues.later: it reads No pillar; needs why.

I also added the missing detail to the "Arguments, in full" section of docs/MCP.md:

  • commits.ref, with its default branch.
  • report.page's http(s) address.
  • The "P0" and "P0 Trust" forms for the pillar, and what later: true means.
  • The reveal arguments are now marked as a secret.
  • The ceiling note now says one null is refused.

I kept the single section instead of putting the full sentences in each tool's table row. @sentinel said that was fine.

commented

I merged main into the branch and pushed it. The only conflict was in test/mcp-size.test.ts.

I kept both sides there. The test still limits each argument description to PROPERTY_MAX bytes and keeps the 36,000-byte cap on the tools/list answer. It also now carries main's check that no tool sets readOnlyHint: false, which needed the annotations field on the tool type.

bun test test/mcp passes (124 tests) and bun x tsc --noEmit is clean. I did not run the whole suite; the forge's check does that on the push.

What the pull does is unchanged: tools/list argument descriptions are cut to a few words (60 bytes each) and the detail lives in docs/MCP.md.

🤖 Generated with Claude Code

Approved — before the latest push

Approved at c5af889f. Only description strings change in src/http/mcp.ts: no property name, type, bound, required list or handler changes. Authorization, input validation and body caps are the same as before. The two points from my last round are fixed: REVEAL_ARG says the link is secret again, and the ceiling text says both null clears. docs/MCP.md has the longer sentences, including the http(s) note for report.page and the pillar forms.

I checked this at the head: bun x tsc --noEmit is clean and bun test test/mcp passes (124 tests). The new walk in test/mcp-size.test.ts would fail on any description over 60 bytes, and the 36,000-byte assert would fail on the base, so the new behaviour is covered. On the preview, / answers 200. /mcp without a token answers 401 with the report hint, so it still gates the same way. I have no token for the preview, so I relied on the test suite for the tools/list size.

A non-blocking note on explore.query, below.

commented

I merged main into the branch and pushed it. The MCP tests (140) pass and the type check is clean. I did not run the full suite; the forge's check will.

The only conflict was in test/mcp-size.test.ts, where both sides edited the constants at the top. I kept both changes. HEADROOM_CEILING takes main's value of 37,500, which replaces my 37,000. My PROPERTY_MAX = 60 stays, so no argument description is longer than 60 characters.

The rest of the pull is unchanged: the shortened argument descriptions in the MCP tools/list answer.

Approved — before the latest push

Clean. At 521ef669 the change only edits description strings: no property name, type, required list, bound or handler changes, so there is no new security surface. The schema bounds (maxLength, minimum/maximum, enum) that validate at the boundary are all untouched. The four points from the last round are in: reveal warns again that the link is a secret, both ceiling fields say both null clears, commits.ref keeps its default, and later says it needs why. The longer sentences that were cut live in docs/MCP.md under "Arguments, in full". The new test walks properties and items and would fail on any description over 60 bytes or a tools/list answer over 36,000 bytes. bun test test/mcp passes here (140 tests). The preview's /mcp answers, and refuses with unauthorized when no token is sent. No page or terminal behaviour changes, so neither door is affected. One small note, not blocking: plan.issues.pillar now shows only "P0" in the schema, and the "P0 Trust" form is now only in the docs.

commented

I merged main into the branch, resolved the two conflicts, and pushed. The MCP tests pass (159 across 33 files) and tsc --noEmit is clean. I didn't run the full bun test; the forge's check will.

  • src/http/mcp.ts: The conflict was in the reason, pillar and under arguments of the limb tool. I kept this pull's short descriptions. main had left those three arguments with no description.
  • test/mcp-size.test.ts: I kept both sides' constants. They are main's HEADROOM_CEILING = 37_000 and DESCRIPTION_CEILING = 120, plus this pull's PROPERTY_MAX = 60 for argument descriptions.
Approved — before the latest push

Approved. The pull only changes description strings in src/http/mcp.ts. No property name, type, required list or schema shape changes, so there is no new input path and the security surface is the same. bun test test/mcp passes at the head (159 tests, 33 files). The new walk in test/mcp-size.test.ts would fail without the cuts: it enforces the 60-byte cap on every property description and the 36,000-byte cap on the answer. The longer sentences are kept in docs/MCP.md under "Arguments, in full". Earlier I asked for the secret warning on reveal, both-null on ceilings, commits.ref and later to be restored, and all four are in. On the preview, / answers 200, and /mcp without a token refuses and points to report, as before. One small point, inline, that doesn't block this.

commented

I merged main into the branch again and pushed. The MCP tests pass (169 across 35 files) and tsc --noEmit is clean. I didn't run the full bun test; the forge's check will.

  • src/http/mcp.ts: There were three conflicts, all in argument descriptions. main had added its own for new_app, model_ceiling and boards. I took main's wording, since each is within the 60-byte limit this pull sets.
  • test/mcp-size.test.ts: main added the reports and repo_labels tools, which pushed tools/list to 36,380 bytes. That broke this pull's "cut by 1,000 bytes" assertion at 36,000. The remaining argument descriptions are already short, so I raised the limit to 36,400 instead of cutting more. That is a looser check than before: the 1,000-byte cut is no longer asserted exactly.
Approved

Approved. All four of my earlier findings are fixed at 784a084: the reveal secret warning, the model_ceiling both-null rule, the commits.ref default and later's meaning. docs/MCP.md now has the full sentences.

Checked:

  • Only description strings change. No property names, types, required lists or enums, so nothing about who can call what has changed.
  • bun test test/mcp passes at the head (169 tests).
  • With this pull's test/mcp-size.test.ts run against main, the test fails and names the 8 descriptions over 60 bytes, so the new test would catch a regression.
  • The preview answers /. Unauthenticated POST /mcp still refuses with 401 and offers only the report door.

One minor point, not blocking: the 36,400 assert still says "cut by 1,000 bytes", which is no longer exact after the merge. See the line comment.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs