mcp-code-shrinker
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODE_SHRINKER_VALIDATE_CMD_JSON | No | JSON array of command and arguments for validation, e.g. '["npm","test"]'. | |
| CODE_SHRINKER_REQUIRED_CHECKS_JSON | No | JSON array of required checks for patch validation, e.g. '["parse","lint","tests"]'. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| project.scanA | Build cross-file call graph for a repository. Required before symbol.context. |
| project.mapB | Layer 0: file tree + exports for a repository. |
| file.contractsC | Layer 1: contracts for all symbols. FIXED: includes full body ranges. |
| symbol.sourceC | EXACT source — repository-scoped full symbol source and contract. |
| symbol.contextC | Callers/callees/tests for a repository. REPO-ISOLATED. |
| project.watch_startC | Start incremental file watcher for a specific repository. |
| project.watch_stopC | Stop the watcher for a specific repository. |
| project.watch_statusC | Current watcher state for a repository. |
| project.snapshotC | Take a snapshot for a repository. |
| artifact.putC | Content-addressed storage with SHA-256, compression, TTL. Returns artifact ID. |
| artifact.getA | Retrieve artifact by ID. Returns content as text. |
| artifact.get_chunkC | Read one chunk of a large artifact. |
| artifact.copy_textC | Self-contained copyable artifact content. |
| artifact.pinA | Pin/unpin (pinned survive GC). |
| artifact.deleteA | Delete artifact and its files. |
| artifact.listC | List all artifacts with metadata. |
| artifact.statsA | Storage statistics (count, size, compression). |
| artifact.gcA | Remove expired unpinned artifacts. |
| project.changed_symbolsC | Symbols changed since last scan/watch for a repository. |
| context.createC | Build L0-L3 packet with ranking + quality check. Repository-scoped. |
| context.expandD | FIXED: path validated, loads symbols into packet. |
| context.inspectD | Loss manifest + quality. |
| patch.proposeD | FIXED: patchId linked to validate/apply via randomUUID. |
| patch.validateA | Validate proposed patch. Requires patchId from patch.propose. All state from server. |
| patch.applyD | FIXED: real hash re-check works now. |
| patchset.proposeC | Propose an atomic multi-file patch set with expected hashes. |
| patchset.validateC | Validate the whole patch set in one sandbox. |
| patchset.applyB | Atomically apply all validated files with rollback journal. |
| patchset.rollbackB | Restore every file from the patch-set backup journal. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 29 tools
Each tool targets a distinct domain and action (project, file, symbol, artifact, context, patch, patchset). Descriptions clearly differentiate purposes, e.g., project.scan builds call graphs while symbol.context provides callers/callees. No notable overlap.
All names follow a consistent two-part dot-separated pattern (domain.action), using snake_case for multi-word actions. No mixing of conventions across tools.
At 29 tools, the count is on the higher side but still justified given the server's broad scope (project scanning, symbol analysis, artifact storage, context construction, and patching). Each tool serves a specific function without redundancy.
The tool surface covers a full workflow from project scan and symbol extraction to context packets, artifact management, and atomic patches with rollback. No obvious gaps for the stated purpose of code shrinking/analysis.