Skip to main content
Glama

Document Create

document_create

Create new text or markdown documents from inline content, specifying name, format, and visibility scope for CozyVTT campaigns.

Instructions

Create a new txt/md document from inline content through REST. Use document_upload for PDF or larger local files, and document_update to replace existing text. Name and description are trimmed; content preserves whitespace. USER is personal, CAMPAIGN requires its DM, and GLOBAL rights are enforced upstream. Each accepted call creates a separate asset. Content is capped at 900 KiB UTF-8; upstream JSON limits also apply. Upload/create share a default 30 requests/minute/user limit. Creation does not separately link a personal asset; use document_share for that. Returns {ok:true,data} on success; tool-body failures return {ok:false,error} with optional diagnostic data. Argument-schema errors are MCP errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAsset title, trimmed to 1..200 characters.
scopeNoVisibility/ownership scope: USER (default personal), CAMPAIGN, or GLOBAL; upstream enforces creation rights. CAMPAIGN uses campaign_id.USER
formatYesText representation: txt or md; PDFs require document_upload.
contentYesComplete text, including empty text, at most 900 KiB UTF-8; rejects C0/DEL controls except TAB/LF/FF/CR.
campaign_idNoExplicit campaign ID; null uses the configured campaign when scope=CAMPAIGN, otherwise omits the field. If supplied, it is forwarded for any scope.
descriptionNoOptional metadata, trimmed to at most 1000 characters; null omits it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, but the description adds substantial behavioral context beyond them: whitespace preservation for content, trimming of name/description, scope-based permission enforcement (USER personal, CAMPAIGN requires DM, GLOBAL upstream), a 900 KiB UTF-8 cap, a shared rate limit of 30 requests/minute/user, and the return envelope shape. It also notes that each accepted call creates a separate asset. No annotation contradiction exists.

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?

The description is longer than average, but every sentence carries operational value, including routing, limits, permissions, and response format. It is front-loaded with purpose and alternatives before diving into behavioral details. It could be slightly tightened, but it remains well-structured and free of filler.

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 the tool's six parameters and rich schema, the description leaves no essential gap: it covers when to use it, alternatives, permissions by scope, size limits, rate limits, return behavior, and a pointer to document_share for linking. The presence of an output schema and detailed input schema further reduces the burden, and the description is more than sufficient for an agent to invoke the tool 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 description coverage is 100%, so the schema already documents all six parameters. The description still adds semantic value by clarifying that 'Name and description are trimmed; content preserves whitespace' and that scope rights are enforced upstream. These nuances are not fully captured in the schema property descriptions, so the description meaningfully supplements the structured input definitions.

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 opens with a specific verb and resource: 'Create a new txt/md document from inline content through REST.' It explicitly distinguishes itself from siblings by naming document_upload (PDF/larger local files) and document_update (replace existing text). An agent can immediately identify what this tool does and how it differs from alternative document tools.

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 gives explicit routing guidance: 'Use document_upload for PDF or larger local files, and document_update to replace existing text.' It also clarifies when document_share is needed ('Creation does not separately link a personal asset; use document_share for that'). This leaves no ambiguity about when to choose this tool over its siblings.

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