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.

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.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds real value: atomic application ('si uno falla, no se escribe nada'), in-order semantics, the exactly-once constraint per `buscar`, and an optimistic-concurrency signal via base_version. It does not explain the failure mode when base_version mismatches, which is the main remaining gap.

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?

Front-loads the core purpose then layers constraints in short paragraphs. Mostly tight, though the exactly-once rule and atomicity are restated across sentences, adding minor redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers atomicity, uniqueness, ordering, version pinning, and the return value (`resumen` del documento resultante), which is sufficient since there is no output schema. It omits the behavior on a base_version conflict and the 50-edit cap (only in schema), leaving a small gap.

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 coverage is 100%, so the baseline is 3, but the description adds nuance beyond the schema: the uniqueness requirement for `buscar` and the `todas: true` escape hatch, the required ordering of edits, and that base_version is the updated_at previously read. It adds meaning over the structured fields.

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?

States a specific verb+resource and scope: 'Cambia PARTES de un documento sin reenviarlo entero', operating on a list of literal replacements over the document's MARKDOWN. This clearly distinguishes it from whole-document tools like update_document or append_document, and it names the exact format source (get_document).

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?

Gives concrete when-to-use context (patch parts instead of resending the whole doc) and a workflow tip: use get_document with `buscar` to locate exact text in long documents, and reemplazar uses the same markdown format as patch_artifact. It does not explicitly state when NOT to use it or name update_document as the alternative, so 4 rather than 5.

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