Skip to main content
Glama

create_document

Crea un nuevo documento en el workspace. 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. Para crear sub-documentos (jerarquía), proveer parent_document_id. 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. Para el MISMO documento en otro workspace: copy_document, no lo vuelvas a generar. Devuelve un resumen (bytes, bloques, tablas, títulos en orden, sha256) para verificar sin releer.

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

Input Schema

NameRequiredDescriptionDefault
nameYesTítulo del documento
contentNoContenido del documento en markdown (o HTML ya armado, que pasa intacto).
workspace_idNoUUID del workspace, o su nombre tal como lo dice el usuario ('Acme', 'el personal'). Omitir si el token ya tiene workspace fijo
parent_document_idNoID del documento padre para crear un sub-documento dentro de otro

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-destructive, non-idempotent, closed-world mutation, so the safety profile is covered. The description adds genuinely useful behavior beyond that: markdown conversion to editor format, HTML passthrough, the rule that each line is a separate block and consecutive lines are not merged, and that mermaid blocks render only on open. It does not discuss permissions or failure modes, but for a create tool with annotations present this is solid additional context.

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-loaded with the core action, then format rules, then sibling routing, then the return summary. Dense but almost every sentence carries operative information; only the return-summary sentence could be trimmed slightly for 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?

No output schema exists, yet the description explains what comes back (resumen with bytes, blocks, tables, title order, sha256) so the agent can verify without re-reading. Combined with the format rules and sibling routing, nothing an agent needs to call this 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 coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not carry: the line-per-block semantics of content, the mermaid-diagram special case, and the purpose of parent_document_id for building hierarchy. This materially changes how an agent should format the content parameter.

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 and resource ('Crea un nuevo documento en el workspace') and immediately constrains what content is accepted (markdown converted to editor format, HTML passed through). It also names the sibling tools it is not (patch_document, append_document, copy_document, start_document_upload), so an agent can distinguish it without opening another schema.

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?

Explicit when-not guidance: if the content already exists as a file or exceeds ~20 KB, use start_document_upload instead of passing it in content. It also routes to patch_document for partial changes, append_document for additions, and copy_document for the same document in another workspace, and explains when parent_document_id should be supplied.

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