Skip to main content
Glama

commander edit

exza_commander_edit
Destructive

Edit exactly one matching text span in owner-authorized file with SHA256 verification.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "oldText": "<oldText>",
      "newText": "<newText>",
      "expectedSha256": "<expectedSha256>"
    },
    "name": "exza_commander_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
newTextYes
oldTextYes
expectedSha256Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed4 schema fields changed
    • addedInput schema / properties / expectedSha256 / description
      Added value: +"Lowercase SHA-256 from the prior read; prevents overwriting changed content."
    • addedInput schema / properties / newText / description
      Added value: +"Replacement text for the exact matching span."
    • addedInput schema / properties / oldText / description
      Added value: +"Text span that must occur uniquely before a guarded edit."
    • addedInput schema / properties / path / description
      Added value: +"Explicit path inside the scope for this tool; no symlink traversal where prohibited."
  4. First observed

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, yet the description adds real value: edits are confined to a single span, the file must be owner-authorized, and a SHA256 check gates the mutation (a staleness/concurrency guard). It omits what happens on hash mismatch or non-unique match, which keeps it below 5.

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

Conciseness4/5

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

A single front-loaded sentence with no filler, packing scope, authorization, and verification into one clause chain. It is efficient, though it errs toward terseness at the expense of the four undocumented parameters.

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 destructive, four-required-parameter mutation with zero schema documentation and no output schema, one sentence is thin. The critical preconditions (hash sourcing, uniqueness failure mode, resulting file state) are left for the agent to infer.

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 coverage is 0%, so the description carries the burden. It only loosely implies path (the file), oldText/newText (the span swapped) and expectedSha256 (verification); it never states that expectedSha256 must be the file's current hash or that oldText must occur exactly once.

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

Purpose4/5

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

Names a specific verb (edit) and precise scope (exactly one matching text span within a single file) with a verification prerequisite. That distinguishes it implicitly from exza_write_file and exza_home_edit_block, though no sibling is named explicitly.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over exza_home_edit_block, exza_commander_append, or exza_write_file, and no mention of prerequisites such as needing to read the file first to obtain a hash. The 'exactly one matching' phrase hints at fragility but not at selection criteria.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources