Skip to main content
Glama

Change documents

edit_document
Destructive

Changes, fixes or rewrites passages in documents and text files (a typo, a sentence, a paragraph, a figure), up to eight edits at once: each edit names a passage copied exactly (without line numbers), found there exactly once, what it becomes, and one line on why. The person sees every edit and confirms it in this AI tool before anything changes. Clients that cannot show that confirmation get a preview and a proposal id instead, and nothing changes until the proposal is confirmed. Files that are not text are not changed here: they get a new version by upload in Alcoven.

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

Input Schema

NameRequiredDescriptionDefault
didNoWhat the person did themselves in this work, in a few words they agree with: what they chose or decided, what they corrected, rewrote or wrote, what they checked and against what. Start with the verb, in the past tense, in their language: "Chose the three-step plan; fixed the March totals; rewrote the opening". Say nothing of what you did, what they did not do, how long it took, or a share of the work. Pass no did when their part was the request and the yes. Everyone who sees the change reads it, people outside the team included. At most 300 characters.
readNoThe § addresses you read for this work, kept with asked. Alcoven adds what it saw you read on this project since you last wrote on it, going back two hours at most.
askedNoWhat the person asked for, in their own words, as they said it: their request only, never the rest of the conversation, and left out when they do not want it shared. It goes on the project with the change, so everyone who sees the change, and their AIs, see why it was made.
editsYes
projectNoThe project's slug, from open_project, like acme. Not needed when a § address names the project, or when the person is on one project.
summariesNoFor a document whose meaning changed: its new summary in one or two sentences.
asked_fromNoWhere the request came from, when the person says so, in a few words: "Tuesday's call with the bank", "Ines's email".

Output Schema

NameRequiredDescriptionDefault
writesNo
appliedYes
previewNo
proposalNo
sensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / sensitive
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / did
      Added value: +{
      +  "description": "What the person did themselves in this work, in a few words they agree with: what they chose or decided, what they corrected, rewrote or wrote, what they checked and against what. Start with the verb, in the past tense, in their language: \"Chose the three-step plan; fixed the March totals; rewrote the opening\". Say nothing of what you did, what they did not do, how long it took, or a share of the work. Pass no did when their part was the request and the yes. Everyone who sees the change reads it, people outside the team included. At most 300 characters.",
      +  "maxLength": 300,
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, it discloses the confirmation gate: the person sees every edit and confirms it inside this AI tool, and clients that cannot show that confirmation receive only a preview plus a proposal id with nothing changed until confirmed. It also states the matching constraint that a passage must appear exactly once, which is precisely the kind of failure-mode context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability is front-loaded and every clause carries information: the edit cap, the exact-copy rule, the confirmation flow, the proposal fallback and the non-text exclusion. The second and third sentences are long and multi-clause, which slightly reduces scannability, but there is little true padding.

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?

For a destructive multi-edit mutation with an output schema already covering return values, the description supplies what an agent most needs: the confirmation/preview protocol, the eight-edit ceiling, the uniqueness requirement on matches, and where non-text changes belong. Behavioral coverage is complete enough to invoke safely, with individual parameter detail delegated to a well-covered schema.

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 86% schema coverage the schema already documents parameters well, but the description adds real meaning about the edits entries: the find text is copied exactly, without line numbers, and must occur exactly once, and each edit carries one line of why. It does not elaborate on did, read, asked_from or summaries, leaving those entirely to the 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 names a specific verb set (changes, fixes, rewrites) and a specific resource (passages in documents and text files), with the unit of work scoped to a passage such as a typo, sentence, paragraph or figure. It also draws the boundary against non-text files, which are versioned by upload in Alcoven instead, so an agent can tell this apart from add_document or add_file.

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?

It gives clear conditions for use (targeted passage corrections, up to eight edits at once) and an explicit exclusion (files that are not text are not changed here). It stops short of naming which sibling handles the other cases beyond the upload path, so no full when-not/alternative map is present.

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