Skip to main content
Glama

patch_document

Destructive

Cambia PARTES de un documento sin reenviarlo entero: una lista de reemplazos literales sobre su MARKDOWN (el mismo que devuelve get_document).

Cada `buscar` tiene que aparecer EXACTAMENTE una vez (si aparece más, agregá contexto hasta que sea único, o `todas: true`).
Se aplican en orden y de forma atómica: si uno falla, no se escribe nada. `reemplazar` es markdown (mismo formato que patch_artifact).
Para encontrar el texto exacto en un documento largo: get_document con `buscar`.
base_version opcional: el updated_at con que lo leíste. Devuelve el `resumen` del documento resultante.

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

Input Schema

NameRequiredDescriptionDefault
editsYesReemplazos, en orden
document_idYesID del documento
base_versionNoupdated_at con el que se leyó el documento
workspace_idNoUUID del workspace, o su nombre tal como lo dice el usuario ('Acme', 'el personal'). Omitir si el token ya tiene workspace fijo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true and idempotentHint=false; the description explains *why*: edits apply in order and atomically, so a single failure writes nothing. It also discloses the uniqueness constraint on each `buscar` and the `base_version` optimistic-concurrency check, plus what is returned (`resumen`). That is real behavior beyond the structured fields.

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?

Content is front-loaded (what it does, then the matching rule, then atomicity, then inputs/return) and broken into short paragraphs. A few clauses restate schema facts (`todas`, empty `reemplazar` = delete), which is minor redundancy rather than 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 mutation tool the description covers the failure mode (atomic, all-or-nothing), the matching contract, the concurrency guard, and the return value, while annotations cover the safety profile. Nothing an agent needs in order to call it correctly is missing.

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?

Schema description coverage is 100%, so the baseline is 3; the description still adds meaning by explaining that each `buscar` must be unique (or set `todas: true`) and that `base_version` is the `updated_at` you read the document with. It does not elaborate on `workspace_id` resolution beyond what the schema already says.

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?

"Cambia PARTES de un documento sin reenviarlo entero" states a specific verb (patch/edit parts), a specific resource (document), and the scope contrast with a full rewrite (update_document). Naming the payload as literal replacements over the document's MARKDOWN further pins down what the tool does.

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 concrete operating guidance: the text to match must be found via get_document with `buscar`, and `reemplazar` follows the same markdown format as patch_artifact. It implies the alternative (full-document update) via "sin reenviarlo entero" but never explicitly says when to prefer update_document over patching.

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