Skip to main content
Glama

Edit a text project file

edit_file
Destructive

Immediately edit one existing editable text file and record the applied change in PaperDock's Review changes UI. Provide exactly one target (fileId or path) and exactly one payload: operations, content, or rangeToken with insert. Read the relevant current text first and pass its baseRevision. For a long replacement covering every line returned by an exact read_file.lineRange call, pass its rangeToken with insert; the token is connection-, file-, revision-, range-, and content-bound and expires after 10 minutes. For other focused edits, use sequential UTF-16 operations and copy expectedText exactly from read_file without retyping, normalization, spelling correction, or manual Unicode escaping; insertions use expectedText: "". On a conflict, read again and retry once. Use content only when broadly rewriting most of the file. This tool cannot create, rename, or delete files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
fileIdNo
insertNo
contentNo
projectIdYes
operationsNo
rangeTokenNo
baseRevisionYes
expectedUpdatedAtNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
applicationStatusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description thoroughly discloses behavior beyond the destructiveHint annotation: it records changes in Review UI, requires reading current content first, retries once on conflict, and explains the connection/file/revision/range/content-bound nature and 10-minute expiry of range tokens. No contradiction with annotations exists.

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 every sentence adds practical information. It is front-loaded with the main purpose and then organized by edit mode, limitations, and conflict handling, making it effective despite its length.

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?

Given the schema's complexity and 0% parameter description coverage, the description covers all important usage modes, token semantics, conflict retry behavior, and constraints. It provides enough context for an agent to invoke the tool correctly without ambiguity.

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 fileId vs path, operations, content, rangeToken+insert, expectedText, baseRevision, and the meaning of insert. projectId and expectedUpdatedAt are not explicitly described, but the core parameters are well covered.

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: immediately edit one existing editable text file and record the change in PaperDock's Review UI. It distinguishes itself by noting it cannot create, rename, or delete files, making its scope unambiguous.

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 gives strong guidance on when to use each edit mode (operations, content, rangeToken) and describes conflict handling and token expiration. However, it does not explicitly contrast edit_file with the sibling replace_file tool, so the choice between those two alternatives is not fully explicit.

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