Skip to main content
Glama

edit_document

Make line-based edits to markdown documents by replacing specific text sequences, generating git-style diffs to track changes.

Instructions

Make line-based edits to a markdown document. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
editsYes
dryRunNo
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: the edit mechanism (line-based replacements), the return format (git-style diff), and the dry-run capability (implied through the parameter). However, it doesn't mention permissions needed, whether edits are reversible, rate limits, or error handling for invalid edits.

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 perfectly concise with two sentences that each earn their place: the first explains the core functionality, the second explains the return value. No wasted words, and the most important information (what the tool does) is front-loaded.

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 mutation tool with 3 parameters, 0% schema coverage, and no output schema, the description is adequate but has gaps. It explains the edit mechanism and return format well, but doesn't cover error conditions, authentication needs, or provide examples. Given the complexity, it should ideally mention more about the edit constraints or validation.

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?

With 0% schema description coverage, the description compensates well by explaining the edit mechanism ('replaces exact line sequences') and the return format. It doesn't detail individual parameters like 'path' or 'dryRun', but the context about line-based edits and git-style diff provides meaningful semantic understanding beyond the bare schema.

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's purpose with specific verbs ('make line-based edits', 'replaces exact line sequences') and identifies the resource ('markdown document'). It distinguishes from siblings like 'write_document' or 'update_navigation_order' by specifying the exact edit mechanism (line-based replacements).

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?

The description implies usage for line-based markdown editing but doesn't explicitly state when to use this tool versus alternatives like 'write_document' or 'update_navigation_order'. It mentions the return format (git-style diff) which provides some context, but lacks explicit guidance on prerequisites or exclusions.

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/alekspetrov/mcp-docs-service'

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