Skip to main content
Glama
Jul879n

reposynapse

by Jul879n

replace_symbol

Update a function, class, or interface by providing only its new implementation. Avoids reading the entire file first, saving context and token usage.

Instructions

Replace the full body of a named function, class, or interface. The AI sends only the new implementation — no need to read the full file first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesRelative file path
symbolYesExact name of the function, class, or interface to replace
new_bodyYesComplete new implementation (including the function signature line)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the disclosure burden. It communicates that the operation mutates by replacing an entire symbol body and that only the new implementation is required, which is useful behavioral context. However, it does not mention what happens if the symbol is not found, whether the operation is reversible, or what it returns.

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: the first states the action and target, the second adds a genuinely useful workflow note. There is no filler or repetition of schema content.

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

Completeness4/5

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

For a simple three-required-parameter write tool with full schema coverage and no output schema, the description covers what is replaced, what the AI must supply, and the fact that pre-reading the file is unnecessary. Minor gaps remain around failure behavior and explicit sibling-tool routing, but the core selection and invocation information is present.

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 description coverage is 100%, so the parameter meanings are already documented. The description reinforces that new_body is the only implementation payload, but it adds no semantic detail beyond the schema, so the baseline score of 3 is appropriate.

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 names a specific action ('Replace') and resource ('the full body of a named function, class, or interface'). The 'full body' qualifier distinguishes it from partial-edit tools like patch_file and insert_after_symbol even without naming them.

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

Usage Guidelines4/5

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

It clearly indicates the intended case for whole-symbol replacement and gives a practical workflow cue ('no need to read the full file first'). It does not explicitly describe when to prefer a sibling tool or when not to use this tool, so it stops short of full guidance.

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