Skip to main content
Glama

add_document

Create new documents in a workspace or folder with optional markdown content, tags, emoji, and AI metadata; slide and moodboard files need their required extensions.

Instructions

Create a new document in a workspace, optionally in a specific folder. NOTE: Do NOT use this for tasks in tasklists - use add_task instead. FOR SLIDES: IMPORTANT - Before creating a slide presentation, you MUST first call get_slides_story_guide. The title MUST end with ".slides.md" (e.g., "My Presentation.slides.md"). FOR MOODBOARDS: Before creating a moodboard, call get_moodboard_guide. The title MUST end with ".moodboard.md" (e.g., "Brand Inspiration.moodboard.md"). Do NOT provide content for moodboard files — the system writes the empty board; add items with add_moodboard_items.

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": {
      "workspace": "<workspace>",
      "title": "<title>"
    },
    "name": "add_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoDocument tags
emojiNoEmoji to display next to the document in the sidebar (e.g., "📄", "📝", "💡", "🔍", "📚", "🎯")
titleYesDocument title. For slides, end with ".slides.md". For moodboards, end with ".moodboard.md" (e.g., "Inspiration.moodboard.md"). The system sanitizes the title into a filename.
aiNoteNoNote about the creation of this document
folderNoFolder path within documents directory (e.g., "projects/2024" or "notes"). Creates folder if it doesn't exist.
aiModelNoAI model that created this document (e.g., "Claude 3.5 Sonnet")
contentNoDocument content (markdown). Omit for moodboard files — their content is generated and any value supplied is ignored.
workspaceYesWorkspace path/name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.19.0
    • changedInput schema / properties / content / description
      Previous value: -"Document content (markdown)"New value: +"Document content (markdown). Omit for moodboard files — their content is generated and any value supplied is ignored."
    • changedInput schema / properties / title / description
      Previous value: -"Document title. For slides, end with \".slides.md\". For canvas, end with \".canvas.md\" (e.g., \"Diagram.canvas.md\"). The system sanitizes the title into a filename."New value: +"Document title. For slides, end with \".slides.md\". For moodboards, end with \".moodboard.md\" (e.g., \"Inspiration.moodboard.md\"). The system sanitizes the title into a filename."
  2. First observedv0.6.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden, and it discloses meaningful behavior: folder auto-creation, title sanitization into a filename, that moodboard content is system-generated and any supplied value ignored, and mandatory prerequisite ordering. It does not state what happens if a document with the same title already exists, whether the call is idempotent, or what the response contains, which are notable gaps for a create operation.

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-loads the general purpose, then branches into per-type rules with clear emphasis markers. Some redundancy exists, since the .slides.md and .moodboard.md suffix requirements are repeated in both the description and the schema, but every sentence conveys actionable routing or constraint information.

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?

For an 8-parameter create tool with no annotations and no output schema, the description covers the important branching and constraints. The main omission is what is returned after creation (document identifier or path) and duplicate-title behavior, which matters because downstream sibling tools operate on the created document.

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

Parameters3/5

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

Schema coverage is 100%, so all eight parameters are already documented in the schema, including the title suffix rules and the moodboard content caveat. The description largely restates the schema's title-suffix guidance rather than adding new parameter meaning, so the baseline of 3 applies.

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 ("Create a new document in a workspace, optionally in a specific folder") and explicitly separates itself from siblings add_task and add_moodboard_items. An agent can identify the tool's function without opening the 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?

Gives explicit when-not guidance ("Do NOT use this for tasks in tasklists - use add_task instead") and names the required prerequisite calls for slides (get_slides_story_guide) and moodboards (get_moodboard_guide). It also states the post-creation path for moodboard items (add_moodboard_items), leaving little to inference.

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