Skip to main content
Glama

update_document

Destructive

Actualiza nombre y/o contenido de un documento (el contenido REEMPLAZA todo lo anterior). Acepta markdown (títulos, negritas, listas, tablas, citas, código) y lo convierte a formato del editor; si el contenido ya viene en HTML se guarda tal cual. Cada renglón es un bloque: los renglones seguidos NO se juntan en un párrafo. Un bloque ```mermaid es un DIAGRAMA: se dibuja solo al abrir el documento. Si el contenido ya existe como ARCHIVO (lo bajaste, lo generó un script) o pesa más de ~20 KB, no lo mandes en content: start_document_upload lo sube por curl sin pasar por el modelo. Para cambiar una parte, patch_document; para agregar al final, append_document. base_version: el updated_at con que leíste el documento (get_document lo devuelve). Si alguien lo cambió en el medio, falla en vez de pisar. Si el documento está abierto en la app, el editor recarga solo con lo nuevo. La versión anterior queda en get_document_versions. Devuelve un resumen (bytes, bloques, tablas, títulos en orden, sha256) para verificar sin releer.

Input Schema

NameRequiredDescriptionDefault
nameNo
contentNoContenido nuevo en markdown (o HTML ya armado, que pasa intacto). Reemplaza todo el contenido anterior.
document_idYesID del documento
base_versionNoupdated_at con el que se leyó el documento; si cambió desde entonces, no se escribe
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.8/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true; the description adds substantial context beyond that: content fully replaces prior text, markdown is converted, HTML passes through, per-line block semantics, mermaid renders as a diagram, base_version prevents clobbering via optimistic locking, open editor hot-reloads, and prior version stays in get_document_versions. This richly exceeds the annotation bar.

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?

Dense but front-loaded: the core replacement behavior and format handling lead, then alternatives, then base_version, then side-effects, then return summary. Nearly every sentence carries a distinct fact, though the volume is heavy for a single field.

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?

Despite no output schema, the description explains the returned resumen (bytes, blocks, tables, heading order, sha256) for verification. Combined with the concurrency and side-effect notes, an agent has everything needed to invoke it correctly.

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 80%, so much is already documented, but the description adds real meaning to base_version (the updated_at from get_document, causing failure on concurrent change) and to content's replacement/conversion semantics. workspace_id is left to the schema, keeping it just under top marks.

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 (actualiza) and resource (documento), clarifying it rewrites name and/or content with full replacement. The following sentences distinguish it operationally from siblings like patch_document and append_document, so an agent can select it confidently.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names alternatives and the conditions that select them: start_document_upload for large/preexisting file content, patch_document for partial changes, append_document for appending. This is textbook when-to-use-vs-alternative routing.

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