Skip to main content
Glama
JSungMin

vs-token-safer

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_symbolA

Search symbol DECLARATIONS by name/substring across the project via the language server's index (clangd C/C++, Roslyn C#/.NET, tsserver JS/TS, pyright Python — auto-detected) — NOT grep. Returns a token-capped kind name @ file:line list, no source bodies. Use this instead of Bash grep/rg for finding a class/function/type/variable in any of those languages.

find_referencesA

Find every call site / usage of a symbol (semantic, via the language server) — NOT a text grep. THE tool to reach for when MODIFYING code: pass symbol (just the name, e.g. "SpawnActor") and it resolves the declaration and returns all references in one call — no need to know a line/column. (A 0-based path+line+character position also works, to disambiguate an overload.) Returns a token-capped file:line list, no bodies. Prefer this over grepping a name to find its uses.

goto_definitionA

Resolve the definition of the symbol at a 0-based position (semantic, via the language server). Returns a token-capped file:line list, no bodies.

hoverA

Type/signature info for the symbol at a 0-based position (language-server hover). A few plaintext lines, no walls of docs. Use to check a type/overload without opening the file.

document_symbolsA

Outline a single file: its classes/functions/types as a token-capped kind name @ file:line list. Cheaper than reading the whole file to see its structure.

renameA

Semantically rename the symbol at a 0-based position across the whole project (language-server rename — updates every reference, never a text sed). Default is a PREVIEW returning the affected file:line list; pass apply=true to write the edits to disk. Use this instead of editing call sites by hand.

replace_symbol_bodyA

Replace a whole declaration (function/method/class body, signature included) by NAMING it — the language-server outline supplies the exact span, so you don't Read the file into context or count lines for an exact-match Edit. Default PREVIEW returns the affected file:line; apply=true writes. Token-cheap symbol-level editing instead of read-whole-file-then-Edit.

insert_after_symbolA

Insert text on a new line AFTER a named declaration (e.g. add a sibling function/method). The outline supplies the insertion point. Default PREVIEW; apply=true writes. No need to Read the file to find the line.

insert_before_symbolB

Insert text on a line BEFORE a named declaration (e.g. add an import/attribute/decorator above it). The outline supplies the insertion point. Default PREVIEW; apply=true writes.

safe_deleteA

Delete a named declaration — but REFUSE while it's still referenced (so a delete can't silently orphan call sites). Checks references first; lists them and stops unless force=true. Default PREVIEW; apply=true writes.

find_filesA

Find files by name (substring or glob like *Manager.cpp) under the project root — token-capped file list. The sanctioned replacement for Bash find -name. No language server needed.

search_textA

Raw text/regex search in source (string literals, comments, config keys — things the symbol index can't answer). Bounded and token-capped to file:line: trimmed-line. The sanctioned replacement for Bash grep when you genuinely need text, not symbols. Prefer search_symbol for code symbols.

vts_gitA

Run a READ-ONLY git command and return its output COMPACTED (token-capped) — for status/log/diff, which the language-server index can't help with but whose raw dump is verbose and repetitive. status groups by change-type + directory; log keeps one line per commit; diff collapses to a per-file +/- diffstat (no hunk bodies). Mutating subcommands (commit/reset/checkout/clean/push/merge/rebase) are REFUSED — this only compacts output; run those directly. Use instead of a raw git status/log/diff.

vts_p4A

Run a READ-ONLY Perforce (p4) command and return its output COMPACTED (token-capped) — for opened/status/reconcile/changes, whose raw output is long and repetitive. Groups files by action + depot directory and caps the list. reconcile is forced to preview (-n); mutating subcommands (submit/revert/edit/add/delete) are REFUSED — run those directly. Use instead of a raw p4 opened etc.

vts_setupA

Configure vs-token-safer (projectPath, backend, maxResults). Writes ~/.vs-token-safer/config.json; run /reload-plugins after. Precedence: env (VTS_*) > config file > default. Can also generate the C++ compile DB in the same step (genCompileDb).

vts_configA

Show current effective vs-token-safer settings + config-file path.

vts_savingsA

Report how many tokens you've saved vs forwarding raw index responses (local, cumulative). Optional graph/daily/history breakdowns + an estimated USD value.

vts_savings_resetA

Clear the local savings ledger.

vts_discoverA

Scan recent Claude Code transcripts (local, read-only) for code searches that BYPASSED vts — Bash grep/rg/find or the Grep tool aimed at source — and report the raw tokens they spent (the missed savings). Use to see where token-heavy text search is still slipping past vts.

vts_warmupA

Pre-build the language-server index (IDE-style) so later searches are fast. Spawns + warms the backend without running a query.

vts_gen_compile_dbA

Generate compile_commands.json for an Unreal project (so clangd gets a full semantic index) by running UBT GenerateClangDatabase. The user's choice vs staying in no-DB text mode. DRY RUN by default (prints the exact command); apply=true runs it (takes minutes, needs the UE build env). The DB and clangd's .cache/ index land OUTSIDE the source tree (~/.vs-token-safer/db/) so git/p4 never see them; inTree=true keeps the classic project-root layout (then a VCS-ignore guard protects it).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/JSungMin/vs-token-safer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server