token-savior
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| WORKSPACE_ROOTS | No | Comma-separated list of absolute paths to project roots to index. | |
| TOKEN_SAVIOR_CLIENT | No | Optional identifier for the client (e.g., 'claude-code', 'cursor', 'windsurf', 'cline', 'hermes') used to attribute savings in the live dashboard. |
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 | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_projectsA | List all registered workspace projects with index status. |
| switch_projectC | Switch the active project. |
| get_git_statusB | Structured git status: branch, ahead/behind, staged, unstaged, untracked. |
| get_changed_symbolsC | Symbol-level summary of worktree changes (or HEAD vs ref). |
| build_commit_summaryC | Compact commit/review narrative with stats, hotspots, suggested type. |
| checkpointB | Unified checkpoint CRUD. op = create | list (default) | restore | delete | prune | compare. |
| replace_symbol_sourceB | Replace an indexed symbol's full source block directly. |
| edit_lines_in_symbolA | Exact string-replace inside an indexed symbol's body (like Edit but symbol-scoped, no Read first needed). |
| insert_near_symbolB | Insert content before or after an indexed symbol. |
| move_symbolB | Move a symbol to a different file, updating imports in all call sites. |
| add_field_to_modelB | Add a field to a model/class/interface. Supports .prisma, .py (dataclass, SQLAlchemy), .ts/.tsx. |
| find_impacted_test_filesB | Infer pytest files likely impacted by changed files or symbols. |
| run_impacted_testsC | Run pytest on files impacted by the current worktree changes. |
| discover_project_actionsA | Detect conventional project actions from build files (tests, lint, build, run) without executing. |
| run_project_actionB | Run a discovered project action by id (bounded output, bounded timeout). |
| get_project_summaryB | Project overview: file count, packages, top classes/functions, infra dirs. |
| list_filesC | List indexed files, optionally filtered by glob. |
| get_structure_summaryB | Structure of one file (functions, classes, imports, line counts), or project-wide if file omitted. |
| get_function_sourceC | Fetch a function/method source body. |
| get_class_sourceB | Fetch a class source body (including methods). |
| get_functionsA | List functions in a file (file_path=...) or across the project. |
| get_classesC | List classes (name, lines, methods, bases, file). |
| get_importsB | List imports (module, names, line). |
| find_symbolA | Locate a symbol: file, line, signature, minimal preview. Searches functions and classes by default — pass kinds=["variable"] for module globals, constants, and class attributes. A miss reports which kinds were searched. |
| get_dependenciesB | Outgoing deps of a symbol: what X calls/uses (downstream). |
| get_dependentsA | Incoming deps: who calls/uses X, direct references only. |
| get_change_impactB | Impact analysis: direct + transitive dependents of a symbol. |
| get_full_contextC | Symbol bundle: location + source + deps/dependents (depth=1) or + change_impact (depth=2). |
| get_call_chainA | Shortest dependency path between two symbols (BFS through the dep graph). |
| get_edit_contextA | Pre-edit bundle: source + direct deps + callers + same-file siblings + impacted tests. |
| get_file_dependenciesB | Files imported by this file (outgoing file-level import edges). |
| get_file_dependentsB | Files that import this file (incoming file-level import edges). |
| search_codebaseB | Regex (default) or semantic (semantic=true) search across indexed files. |
| search_in_symbolsB | Regex search that returns the enclosing function/class for each match, in addition to file:line. |
| reindexC | Rebuild the project index. |
| set_project_rootA | Register a new project root and switch to it. If the path is already registered, this becomes a cheap active-root switch (no reindex) unless force=true is set. |
| get_feature_filesC | Files matching a feature keyword + traced imports, classified by role (core, test, config). |
| ts_discoverA | Scan Claude Code transcripts for missed Token Savior opportunities (native-call chains that should have been a single TS call) and/or report TS-vs-native adoption ratios. Scans ALL transcript projects by default; pass project= to filter. format='table' (default) or 'json' returns ranked Findings; format='adoption' or 'adoption_json' returns the TS adoption summary with trend + worst sessions. Read-only, PII-safe. |
| get_statsC | Unified stats dispatcher. category = usage (default) | session_budget | tca | dcp | linucb | warmstart | leiden | speculation | lattice. |
| get_routesA | Detect API routes and pages in a Next.js App Router project: path, file, HTTP methods, type. |
| get_env_usageA | Cross-reference an env var across code, .env files, and workflow configs. Shows where it's defined, read, written. |
| analyze_configA | Audit config files (.env/.yaml/.toml/.json): duplicates, secrets, orphans. |
| find_dead_codeA | Project-wide audit of unreferenced functions/classes (zero callers, excludes entry points, tests, route handlers). |
| find_hotspotsB | Rank functions by hotspot kind. complexity (all langs) | allocation (Java) | performance (Java). |
| detect_breaking_changesB | Breaking API changes vs a git ref: removed funcs/params, added required params, signature changes. |
| analyze_dockerA | Audit Dockerfiles: base images, stages, exposed ports, ENV/ARG, cross-ref with config files. |
| get_db_schemaB | Condensed SQL-migration snapshot: tables (cols, types, nullability, defaults), PKs, FKs, indexes, RLS policies. |
| get_entry_pointsA | Score functions by likelihood of being execution entry points: routes, handlers, main, exported APIs. |
| memory_saveC | Persist a fact, guardrail, or note across sessions. |
| memory_searchB | Layer 2 FTS5 search over memory observations, compact rows with snippets (~60 tokens/result). |
| memory_getB | Layer 3: full observation content by IDs (~200 tokens/result). Final progressive-disclosure layer. |
| memory_deleteA | Soft-delete an observation by ID (sets archived=1). |
| memory_indexC | Layer 1: compact index of recent observations — ID, type, title, importance, age, citation URI. |
| corpus_buildC | Build a thematic corpus from observations filtered by type / tags / symbol. |
| find_semantic_duplicatesA | Find duplicate functions. method='ast' (fast, hash-based, catches copy-paste) or 'embedding' (Nomic cosine, catches conceptual clones, tagged sim=min..mean per cluster). |
| find_import_cyclesA | Detect import cycles (strongly-connected components) in the file-level import graph (Tarjan's). |
| corpus_queryA | Format all observations of a named corpus as markdown context + a question, ready for answering. |
| reasoning_saveB | Persist a reasoning trace (goal + steps + conclusion) for later reuse. |
| reasoning_searchB | Search stored reasoning chains by goal similarity (FTS5 + Jaccard). |
| reasoning_listA | List stored reasoning chains by access_count then recency. |
| capture_putB | Sandbox a verbose tool output to FTS5 store; returns id + preview. |
| capture_searchC | BM25 search across sandboxed tool outputs. Returns id, snippet, bytes. |
| capture_getB | Read a capture (range: head/tail/all/preview/line:N-M). |
| capture_aggregateC | Aggregate over a capture: stats|count_lines|unique_lines|extract:|count:. |
| capture_listC | List recent captures (newest first). |
| capture_purgeB | Delete captures by age/session/project (filter required). |
| memory_adminB | Single dispatch for all memory admin / maintenance ops (status, doctor, dedup_sweep, distill, roi_gc, consistency, vector_reindex, etc.). |
| ts_executeA | Run a JS script in a Node sandbox with a typed facade. The script body executes as |
| ts_searchA | Find the top-K Token Savior tools most relevant to a natural-language query via embedding cosine similarity. Use when the manifest is in 'tiny' or 'code_mode' profile or you don't know which tool fits. Returns each candidate with its full inputSchema (format='schema') or a one-line TypeScript signature (format='ts') suitable for ts_execute scripts. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mibayy/token-savior'
If you have feedback or need assistance with the MCP directory API, please join our Discord server