Repository navigation
Conversation
Codex, Cursor and Mistral Vibe load the whole tools/list at the start of every session. It was 49 KB (~12k tokens); it is now 27 KB (~7k). Each tool and parameter description keeps what it does, when to use it and its defaults. Gone: history, internals, and one path-resolution paragraph repeated twelve times. Rewritten by source span from a TypeScript-parser extraction, so only description strings changed. Fixes descriptions that contradicted the code: render_preview's cameraAngle/grid (every render is the 4-pane view), export_shape's openIn (works without VS Code), preview_shape's inline default, and check_collisions' pointer to a category that doesn't exist. Nothing is clipped by the sanitizer's 1,000-char limit any more; three were, run_simulation's MuJoCo paragraph among them. Tests keep tools/list under 30,000 chars and fail if the sanitizer ever has to clip a description (both fail on the previous descriptions). README: "Fewer tools, fewer tokens" shows disabled_tools for Vibe and Codex, and Cursor's per-tool switches, for the 14 tools most sessions never call (~2.8k tokens). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
martinrieder
added a commit
to martinrieder/ShapeItUp
that referenced
this pull request
Oct 14, 2026
CONTRIBUTING.md's 'Adding a New MCP Tool' checklist requires a new tool to be documented in getApiReference() — verify_design was registered without its entry. This adds a 'verification' category covering the acceptance-gate toolset: - verify_design as the anchor: the one-call battery (render, collisions, simulation, export), skip flags, the render-failure short-circuit - the surrounding gates: check_collisions (exact intersect vs the battery's AABB prefilter), sweep_check, run_simulation's author- declared assertions, validate_joints, describe_geometry/ preview_finder - the author-declared vs tool-driven distinction: expectedContacts and sim.assertions travel with the design file; call-time args merge with file-declared rules Also updates the category listing in get_api_reference's no-arg response. Conflict analysis vs open upstream PRs: PR asbis#16's tools.ts hunks touch executeWithPersistedParams, registrations, and the examples category content — not the category list or the refs map. PR asbis#18 edits only description strings in registrations that predate verify_design. Both trial-merge cleanly. The SKILL.md table row (the other checklist item) is deliberately NOT done: PR asbis#16 deletes the entire tool table, so the correct post-asbis#16 contribution is a prose line in its verification cluster, not a row that would conflict. Tests: 2 new (category exists, documents the gate toolset and the author-declared concept). Suite 1264 total; pnpm lint and pnpm build clean. Co-authored-by: martinrieder <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #16 (part of the unreleased 1.30.1). Follows up on the token discussion in #13 and #16.
Why
Claude Code loads MCP tools on demand. Codex, Cursor and Mistral Vibe put the whole
tools/listin context at the start of every session, whether or not it does any CAD. ShapeItUp's was 49 KB, about 12k tokens.What changed
tools/list: 49,150 → 27,016 characters (−45%, ~12.3k → ~7k tokens).render_preview)How the descriptions were rewritten:
workingDirfor./imports,expectedContacts,persistprecedence, the MuJoCo opt-in).Descriptions that contradicted the code:
render_preview:cameraAnglearrays andgridpromised a multi-angle collage. The handler uses them only for the summary text; every render is the 4-pane view.export_shape'sopenInsaid it needs VS Code. It uses the server's own app detection.preview_shape'sinlineclaimed to matchrender_preview's default. They're opposite (true vs false).check_collisionspointed atget_api_reference('verification'), which doesn't exist.Nothing is clipped any more. Three descriptions were over the sanitizer's 1,000-character limit and lost their endings for every client:
preview_shape,check_collisionsandrun_simulation. The last one lost the paragraph on its MuJoCo engine.New tests in
schema-sanitizer.test.ts, using the realtools/listhandler:Both fail on the previous descriptions (
expected 49150 to be less than 30000;['preview_shape', 'run_simulation', 'check_collisions']).README: "Fewer tools, fewer tokens". It shows how to switch off the 14 tools most sessions never call (~2.8k tokens):
disabled_toolswithshapeitup_*names, placed above[[mcp_servers]], with a note on why notenabled_tools.disabled_tools.The npm README links to it.
Test plan
pnpm lint,pnpm build,pnpm test: 65 files, 1233 teststools.tsand pass on the new oneopen_viewerserves assets, a Rapier simulation runsdisabled_toolsplacement and naming checked against OpenAI's MCP docs; Vibe's against its README🤖 Generated with Claude Code