token-saver
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TOKEN_SAVER_ROOT | No | The only tree the server may read (alternative to --root and CLAUDE_PROJECT_DIR; defaults to the current directory). | |
| TOKEN_SAVER_QUIET | No | Set to 1 to hide the [-91%: …] savings footer. | |
| CLAUDE_PROJECT_DIR | No | The only tree the server may read (alternative to --root and TOKEN_SAVER_ROOT; defaults to the current directory). | |
| TOKEN_SAVER_NO_GITIGNORE | No | Set to 1 to not apply .gitignore rules. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Cheap read-only views; prefer them to full reads. project_map: orient. file_outline: see a file. read_symbol/read_slice: read only what you need. search_compact: grep. json_shape: big JSON. digest_log: logs. Long command output: pipe it, e.g. npm test 2>&1 | node "/app/dist/index.js" digest. To edit, Read with offset/limit taken from the line numbers shown.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| project_mapA | Folder tree with token cost per entry (gitignore applied). Use first. |
| file_outlineB | Functions/classes/types/headings of a file with line numbers. |
| read_symbolC | Body of one function/class by name. |
| read_sliceC | Lines start-end (1-based, max 400). |
| search_compactB | Grep the project; hits grouped per file, lines clipped. Literal, case-insensitive by default. |
| digest_logA | Condense a log: repeats grouped (×N), errors/warnings kept. Pass path; text only for output you already have. |
| json_shapeC | Structure of a JSON/JSONL file: keys, array lengths, sample values. |
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 7 tools
Each tool targets a distinct inspection granularity: project tree, file outline, symbol body, line slice, grep search, log condensation, and JSON structure. The only apparent overlap is between file_outline/read_symbol/read_slice, but their descriptions make the boundaries clear. An agent can reliably choose the right tool.
All names use consistent snake_case and are concise and readable. The pattern mixes noun-first names (project_map, file_outline, json_shape) with verb-first names (read_symbol, read_slice, search_compact, digest_log), but this is a minor deviation rather than confusion.
Seven tools is well-scoped for a token-efficient codebase/log inspection server. Each tool covers a distinct exploration need without obvious redundancy.
The surface covers the core read-only inspection workflow: project structure, file outline, symbol extraction, line ranges, search, log summaries, and JSON shape. Minor gaps exist, such as no regex search or explicit multi-file/batch read operation, but agents can work around these with the provided tools.