Skip to main content
Glama

create_document

Add new content to a knowledge base by creating a document in a specified collection. Supports markdown content, nesting under a parent document, and immediate publishing or saving as draft.

Instructions

Creates a new document in a specified collection.

Use this tool when you need to:

  • Add new content to a knowledge base

  • Create documentation, guides, or notes

  • Add a child document to an existing parent

  • Start a new document thread or topic

Note: For Mermaid diagrams, use mermaidjs (not mermaid) as the code fence language identifier for proper rendering.

Args: title: The document title collection_id: The collection ID to create the document in text: Optional markdown content for the document parent_document_id: Optional parent document ID for nesting publish: Whether to publish the document immediately (True) or save as draft (False)

Returns: Result message with the new document ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
collection_idYes
textNo
parent_document_idNo
publishNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate mutation (readOnlyHint=false) and non-idempotency (idempotentHint=false). The description adds value by detailing the publish parameter behavior (publish vs draft) and a rendering note about Mermaid code fences. It also mentions the return format (result message with new document ID).

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 moderately concise. It starts with a clear statement, uses bullet points for use cases and parameters, and includes a specific note on Mermaid. The use case list is somewhat redundant with the purpose, but overall structure is good.

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?

Given the 0% schema coverage and presence of annotations and output schema, the description covers tool purpose, parameters, and return value adequately. It lacks details on constraints (e.g., title uniqueness) or error conditions, but is sufficient for basic usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description fully explains all five parameters: title, collection_id, text (optional markdown), parent_document_id (optional for nesting), and publish (True=publish, False=draft). This compensates completely for the lack of schema 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 explicitly states 'Creates a new document in a specified collection' and lists specific use cases (add new content, create documentation, add child document), clearly distinguishing it from sibling tools like update_document or archive_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?

The description provides a 'Use this tool when you need to' list that covers typical creation scenarios (add to knowledge base, create docs, nest under parent). It does not explicitly state when not to use it, but the context and sibling names imply alternatives for updating or deleting.

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/fastmcp-me/mcp-outline'

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