Skip to main content
Glama

Hashline Edit

hledit

Edit files safely using hash-anchored line references. Anchors from reads detect stale context before any write, enabling reliable single or batch changes.

Instructions

Read, edit, or batch-edit files using hash-anchored line references (LN#HASH). Use op:'read' to get anchors, op:'edit' for single changes, op:'batch' for multiple edits in one call. Anchors come from the most recent read and detect stale context before any write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesOperation: 'read', 'edit', or 'batch'
grepNoFilter lines by substring (read)
pathYesFile path
afterNoFor action:'insert', insert after anchor
editsNoJSON array of batch edit ops (op: read/edit/batch)
limitNoMax lines to return (read)
actionNoEdit action: replace, insert, delete, or replace-range. Defaults to replace unless end_anchor or after imply otherwise.
anchorNoLN#HASH anchor, e.g. 12#NK
offsetNo1-indexed starting line (read)
contentNoReplacement or inserted content; empty = delete
end_anchorNoEnd anchor for replace-range/delete range
Behavior3/5

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

With no annotations, the description bears the full burden of behavioral disclosure. It discloses that anchors detect stale context before writes, which is a key behavioral trait. However, it omits details about error handling, side effects, permissions, or idempotency of write operations. For a tool with three mutable operations, more transparency would be beneficial.

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 two sentences long, front-loading the core purpose and then providing actionable usage guidance. Every sentence adds value with no unnecessary words, making it concise and well-structured.

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?

Given the complexity of three operations and 11 parameters with no output schema and no annotations, the description covers the essential workflow (read anchors then edit) and stale context detection. However, it lacks details on return formats, error handling, and safety concerns for write operations. It is adequate but not fully comprehensive.

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 100%, so all parameters have individual descriptions in the schema. The tool description only briefly mentions the operations and anchors, adding little beyond what the schema provides. Thus, it meets the baseline of 3 for a tool with full schema coverage.

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 that the tool reads, edits, or batch-edits files using hash-anchored line references, specifying the three operations (read, edit, batch) and their distinct purposes. This provides a specific verb-resource combination that distinguishes the tool even without sibling context.

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 explicitly instructs when to use each operation: 'Use op:'read' to get anchors, op:'edit' for single changes, op:'batch' for multiple edits.' It also notes that anchors come from the most recent read and detect stale context, which guides the proper sequence of operations. However, it does not mention when not to use the tool or alternatives, as no siblings are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dabito/hledit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server