Skip to main content
Glama

create_document

Create a document from raw markdown and ProseMirror data. This escape hatch bypasses templates but is not idempotent; check existing documents after a timeout before retrying.

Instructions

Create a document from a raw payload (escape hatch — prefer create_document_from_template). serialized must be an object: {title, body (markdown), serialized (JSON-encoded ProseMirror doc), fields (JSON-encoded field-values map)}. NOT idempotent: if the call times out, the document may still have been created — list_documents before retrying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawYesDocument body as markdown
metaNoOptional document metadata
vendor_idNoOptional vendor id (UUID)
serializedYesSerialized content: {title, body, serialized: '<ProseMirror JSON string>', fields: '<field-values JSON string>'}
content_type_idYesContent type id (UUID)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states 'NOT idempotent' and explains the timeout scenario, which is critical behavioral information for a create operation. However, it does not mention return values, error handling, or permissions, which would enhance transparency further.

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

Conciseness5/5

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

The description is concise and well-structured: a single sentence establishes purpose and alternative, followed by a compact payload specification and a crucial idempotency warning. Every sentence serves a distinct purpose with no 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?

Despite having no output schema, the description covers the complex nested payload format and the non-idempotency caveat, which are the most contextually important aspects for safe usage. It doesn't explain return values or other parameters, but the schema covers those, and the description focuses on what the agent must know to avoid mistakes.

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?

The input schema already covers all parameters with 100% description coverage, earning a baseline of 3. The description adds value by detailing the required structure of the 'serialized' parameter as an object with nested fields, and clarifying that 'raw' is markdown. This goes beyond the schema's generic descriptions.

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 clearly states the tool creates a document from a raw payload, using a specific verb ('Create') and resource ('document'). It distinguishes itself from the sibling tool by explicitly labeling itself an 'escape hatch' and preferring create_document_from_template, making the tool's purpose unambiguous.

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?

The description provides explicit usage guidance: 'prefer create_document_from_template' indicates when this tool should not be used, and the warning about non-idempotency with a suggestion to list_documents before retrying gives clear operational instructions. This is exemplary guidance for an alternative tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/salsabeeljamal/wraft-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server