Skip to main content
Glama

edit

Destructive

Replaces exact UTF-8 text in an existing file within a declared scope, using a stable operation ID and optional SHA-256 verification.

Instructions

Apply an exact UTF-8 text replacement to an existing file within declared scope using a stable operation_id and optional expected_sha256 check.

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": {
      "context_id": "<context_id>",
      "operation_id": "<operation_id>",
      "path": "<path>",
      "old_string": "<old_string>",
      "new_string": "<new_string>"
    },
    "name": "edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
context_idYes
new_stringYes
old_stringYes
replace_allNo
operation_idYes
expected_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.5/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=true, so the description need not establish that this is a mutating operation. It adds useful behavioral context beyond annotations: exact UTF-8 replacement, stable operation_id usage, and an optional expected_sha256 integrity check.

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?

The description is a single front-loaded sentence with no filler. It is dense but efficient, though the phrase 'within declared scope' is somewhat vague.

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?

For a destructive file-editing tool with seven parameters, five required, and zero schema description coverage, the definition is too thin. It provides useful high-level context but omits parameter-level details, replace_all semantics, and failure behavior that an agent would need to invoke it correctly.

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 0%, so the description must carry the burden. It adds meaning for operation_id, expected_sha256, and old/new strings, but leaves path, context_id, and replace_all behavior insufficiently explained for a seven-parameter tool.

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?

The description states a specific verb and resource: apply an exact UTF-8 text replacement to an existing file. It is clear what the tool does, but it does not explicitly differentiate it from siblings such as write or read.

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?

Usage is implied by 'existing file' and 'within declared scope', suggesting edits rather than file creation. However, the description gives no explicit when-to-use or when-not-to-use guidance and does not name alternatives such as write.

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