Skip to main content
Glama
Claude Free Code MCP

Claude Free Code MCP

by ImIpscanning

edit_lines

Destructive

Apply multiple non-overlapping 1-based line edits to a file atomically, with snapshotting and optional SHA-256 validation to prevent conflicting changes.

Instructions

Apply multiple non-overlapping 1-based line edits atomically, with snapshot and optional expectedSha256.

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": {
      "file": "<file>",
      "edits": "<edits>"
    },
    "name": "edit_lines"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesRelative file
editsYesLine edits
expectedSha256NoOptional SHA-256 of the version being edited

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructive=true and readOnly=false, so the description does not need to repeat that. It adds useful behavior beyond the annotations: atomic application, snapshot creation, and an optional expectedSha256 guard for concurrent-version safety. It does not explain snapshot retention or exact failure/rollback behavior.

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?

The definition is a single front-loaded sentence with no filler. Every phrase carries operational meaning: multiple edits, non-overlap, 1-based indexing, atomicity, snapshot, and expectedSha256.

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 multi-edit tool with no output schema, the description covers the core operation but omits important failure semantics, what the snapshot is and where it goes, and safety guidance such as previewing before applying. An agent can call it, but not with full confidence about edge cases.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description earns an extra point by adding the 'non-overlapping' constraint on edits, which the schema does not encode, and by emphasizing 1-based line semantics. It still does not clarify edit ordering or what happens when constraints are violated.

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 ('Apply') and resource ('line edits') and adds meaningful constraints: multiple, non-overlapping, 1-based, and atomic. This clearly distinguishes line-based bulk editing from a generic edit operation, though it does not explicitly name a sibling alternative.

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 explicit when-to-use or when-not guidance. The description does not mention preview_replace, replace_exact, or any prerequisite workflow such as previewing destructive edits or supplying expectedSha256. Usage is only inferred from the verb and resource.

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