Skip to main content
Glama

edit_block

Destructive

Replace exact UTF-8 text after matching expected count and optional SHA-256. Confirm consequential edits.

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": {
      "device_id": "<device_id>",
      "path": "<path>",
      "old_text": "<old_text>",
      "new_text": "<new_text>"
    },
    "name": "edit_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
projectNo
new_textYes
old_textYes
device_idYes
expected_sha256No
expected_matchesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / project
      Added value: +{
      +  "default": "",
      +  "title": "Project",
      +  "type": "string"
      +}
  2. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the risk profile is known. The description adds genuinely useful behavior: matching is gated on expected count and an optional SHA-256, which implies a safety check before mutation. It does not say what happens on mismatch (hard failure vs. partial apply) or whether the replacement is atomic, leaving a meaningful gap for a destructive tool.

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?

Two front-loaded sentences with no filler; the core operation and safety gate come first. The trailing 'Confirm consequential edits' is slightly cryptic but short enough not to hurt.

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 7-parameter mutation with no output schema and no schema descriptions, the definition covers the core mechanism but omits the target parameters (device_id, path) and the failure/return behavior. Adequate to call correctly in the common case, incomplete for edge cases.

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% across 7 parameters, so the description must compensate and only partly does: it explains expected_matches ('expected count') and expected_sha256 ('optional SHA-256') and implies old_text/new_text. device_id, path, and project receive no explanation, and the SHA-256 semantics (hash of what — the old text or the whole file?) are left ambiguous.

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 uses a specific verb + resource: 'Replace exact UTF-8 text', which tells an agent this is a text-substitution edit rather than a whole-file write or a delete. It is distinguishable from siblings like delete_path or create_directory, but it never names the file/path target explicitly, so the resource is inferred from context.

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 statement of when to use this versus other editing/file tools, nor any exclusion. 'Confirm consequential edits' is a vague caution rather than actionable guidance about preconditions or alternatives.

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