Skip to main content
Glama
ck0i

hashline-mcp

by ck0i

hashline_edit

Edit files safely using line:hash references, ensuring changes apply only when the file matches expected content. Supports replace, insert, and delete operations with multi-op atomic-style updates.

Instructions

Edit a file using hashline references from hashline_read. Reference lines by "line:hash" (e.g. "12:a3") — if the hash doesn't match the current file, the edit is rejected (re-read and retry). Supports: replace (single line or range), insert_after, insert_before, delete (single line or range). Multiple operations are applied bottom-to-top to preserve line numbers. Returns a context window around edited lines with updated hashes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative file path to edit
operationsYesEdit operations to apply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and handles it well. It discloses the hash-mismatch rejection mechanism, bottom-to-top application order to preserve line numbers, and the context window return with updated hashes. These are meaningful behavioral details beyond what the schema alone conveys.

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 description is dense but well-organized: purpose, reference format, safety check, supported operations, ordering, and return value all fit in four sentences. Every sentence contributes essential information without redundancy.

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

Completeness5/5

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

Despite having no output schema and no annotations, the description covers the full invocation lifecycle: how to reference lines, what happens on mismatch, which operations are supported, how multiple operations are applied, and what the response will contain. This is sufficient for correct tool use.

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 coverage is 100%, so the schema already documents path, operations, type enum, target format, content, and end_target. The description adds operational context like rejection behavior and ordering, but it mostly restates parameter facts already present in the schema. A baseline 3 is appropriate.

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?

The description clearly states the tool edits a file using hashline references, naming the exact reference format and supported operations. It also distinguishes itself from the sibling hashline_read by framing editing as the counterpart to reading.

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

Usage Guidelines4/5

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

The description explains that references come from hashline_read and instructs the agent to re-read and retry when a hash mismatch occurs. It provides clear workflow context, though it does not explicitly enumerate when not to use this tool or name alternative editing tools.

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

Deploy Server

Other Tools