Skip to main content
Glama
JSungMin

vs-token-safer

by JSungMin

replace_symbol_body

Replace a named function/class/method from the language-server index, skipping whole-file reads and exact-match line counts. Preview by default; apply=true writes in one call.

Instructions

Change a whole function/class/method by NAMING it — USE INSTEAD OF Read-the-file + Edit (the outline gives the span, so you skip the whole-file Read and exact-match line-counting). PREVIEW by default; apply=true writes in ONE call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesNew full text (signature + body).
lineNo0-based line; disambiguate same-named (optional).
pathNoFile holding the symbol (else resolved via the index).
applyNoWrite to disk (default false = preview).
symbolYesDeclaration name to replace.
backendNo
maxResultsNo
projectPathNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed7 schema fields changedv0.37.3
    • changedInput schema / properties / apply / description
      Previous value: -"Write to disk (default false = preview only)."New value: +"Write to disk (default false = preview)."
    • removedInput schema / properties / backend / description
      Removed value: -"Backend override; auto-detected."
    • changedInput schema / properties / body / description
      Previous value: -"New full text for the declaration (signature + body)."New value: +"New full text (signature + body)."
    • removedInput schema / properties / maxResults / description
      Removed value: -"Result cap (60)."
    • changedInput schema / properties / path / description
      Previous value: -"File holding the symbol (pins the outline; else resolved via the index)."New value: +"File holding the symbol (else resolved via the index)."
    • removedInput schema / properties / projectPath / description
      Removed value: -"Project root (cwd)."
    • changedInput schema / properties / symbol / description
      Previous value: -"Declaration name to replace (e.g. a function/class name)."New value: +"Declaration name to replace."
  2. Changed1 schema field changedv0.35.0
    • changedInput schema / properties / line / description
      Previous value: -"0-based line to disambiguate same-named symbols (optional)."New value: +"0-based line; disambiguate same-named (optional)."
  3. Changed3 schema fields changedv0.29.2
    • changedInput schema / properties / backend / description
      Previous value: -"clangd|roslyn|typescript|pyright (auto)."New value: +"Backend override; auto-detected."
    • changedInput schema / properties / maxResults / description
      Previous value: -"Result cap (default 60)."New value: +"Result cap (60)."
    • changedInput schema / properties / projectPath / description
      Previous value: -"Project root (default cwd)."New value: +"Project root (cwd)."
  4. Changed3 schema fields changedv1.0.3
    • addedInput schema / properties / backend / description
      Added value: +"clangd|roslyn|typescript|pyright (auto)."
    • addedInput schema / properties / maxResults / description
      Added value: +"Result cap (default 60)."
    • addedInput schema / properties / projectPath / description
      Added value: +"Project root (default cwd)."
  5. First observed

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses key behaviors: preview by default, apply=true writes in one call. Lacks details on error handling or side effects but covers the main behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two efficient sentences that front-load purpose and usage, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex replace operation, description covers main behavior but lacks return value info and error handling. Undocumented params not addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 63%; description adds meaning for key params (symbol, body, apply) but doesn't explain projectPath, backend, maxResults. Adequate for required params but incomplete overall.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it changes functions/classes/methods by naming them, and distinguishes itself from sibling tools like read_symbol and insert_symbol by positioning as a replacement for read-file + edit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'USE INSTEAD OF Read-the-file + Edit' and explains preview vs apply behavior, giving clear context on when and how to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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