Skip to main content
Glama

replace_range

Atomically replace a line range in a file using an optimistic-lock hash to prevent conflicts during concurrent edits.

Instructions

Atomically replace an inclusive line range using a mandatory optimistic-lock hash.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
end_lineYes
start_lineYes
replacementYes
expected_sha256Yes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses atomicity and the mandatory optimistic-lock hash, which are important behavioral traits. However, it does not describe what happens on hash mismatch (e.g., error, no change), permission requirements, or whether the operation is destructive. This is a meaningful gap for a mutation tool.

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?

A single, information-dense sentence with no filler. The core action and key constraint are front-loaded. Every word contributes meaning, making it highly concise and well-structured.

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

Completeness2/5

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

With five required parameters, no annotations, and only a terse description, the tool is under-specified. It lacks parameter semantics, error behavior, and context for the hash requirement. While an output schema exists, it does not mitigate the missing behavioral context. The description is insufficient for an agent to call the tool correctly without further inference.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It maps 'inclusive line range' to start_line/end_line and 'optimistic-lock hash' to expected_sha256, but leaves path and replacement unexplained. The description adds minimal meaning beyond the parameter names themselves, which are self-evident. Given the zero coverage, a higher score is not warranted.

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?

States a specific action: 'Atomically replace an inclusive line range' – clear verb, resource, and key constraint (atomicity + optimistic-lock hash). Distinguishes from siblings like read_file, search_text, and git_diff which are read-oriented. The purpose is unambiguous.

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

Usage Guidelines3/5

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

Does not explicitly mention alternatives or when not to use. The description implies use for modifying a specific line range, and the mandatory hash implies a prerequisite (must know current file hash), but no explicit exclusions or comparisons to sibling tools are provided.

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