Skip to main content
Glama
huiseo
by huiseo

create_document

Create new documents in Outline wiki by specifying title, content, collection, and optional parent document for organized knowledge management.

Instructions

Create a new document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
textNo
collectionIdYes
parentDocumentIdNo
publishNo

Implementation Reference

  • The core handler function that implements the create_document tool by calling the Outline API to create a new document.
    async create_document(args: CreateDocumentInput) {
      checkAccess(config, 'create_document');
      const { data } = await apiCall(() =>
        apiClient.post<OutlineDocument>('/documents.create', {
          title: args.title,
          text: args.text,
          collectionId: args.collectionId,
          parentDocumentId: args.parentDocumentId,
          publish: args.publish,
        })
      );
      return docResult(data, MESSAGES.DOCUMENT_CREATED);
    },
  • Zod schema defining the input parameters for the create_document tool.
    export const createDocumentSchema = z.object({
      title: z.string().min(1, 'Title is required'),
      text: z.string().default(''),
      collectionId,
      parentDocumentId: z.string().uuid().optional(),
      publish: z.boolean().default(true),
    });
  • Registration of document handlers (including create_document) into the combined ToolHandlers object used by the MCP server.
    export function createAllHandlers(ctx: AppContext): ToolHandlers {
      return {
        ...createSearchHandlers(ctx),
        ...createDocumentHandlers(ctx),
        ...createCollectionHandlers(ctx),
        ...createCommentHandlers(ctx),
        ...createBatchHandlers(ctx),
        ...createSmartHandlers(ctx),
      } as ToolHandlers;
    }
  • src/lib/tools.ts:76-79 (registration)
    MCP tool definition registration, specifying name, description, and schema reference for create_document.
      'create_document',
      'Create a new document.',
      'create_document'
    ),
  • src/index.ts:84-86 (registration)
    Instantiates the app context and creates the handlers object (including create_document handler) for MCP tool execution.
    const ctx = createAppContext(config);
    const handlers = createAllHandlers(ctx);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but only states the action ('Create') without any behavioral context. It doesn't mention whether this requires authentication, what permissions are needed, whether it's idempotent, what happens on failure, or what the response contains. For a creation tool with 5 parameters and no annotations, this is a significant transparency gap.

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 maximally concise with a single sentence that directly states the action. There's no wasted words or unnecessary elaboration. While under-specified, it's efficiently structured for what it does convey.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a document creation tool with 5 parameters, no annotations, no output schema, and multiple sibling tools, the description is completely inadequate. It doesn't explain what gets created, how parameters interact, what the tool returns, or when to use it versus alternatives. The minimal description fails to provide the context needed for effective tool selection and invocation.

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

Parameters1/5

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

The description provides zero information about any of the 5 parameters. With 0% schema description coverage and no parameter guidance in the description, the agent has no semantic understanding of what 'title', 'text', 'collectionId', 'parentDocumentId', or 'publish' mean or how they affect document creation. This is inadequate for a tool with multiple parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a new document' is a tautology that restates the tool name without adding specificity. It doesn't clarify what type of document is being created (e.g., text document, wiki page, knowledge base entry) or distinguish it from sibling tools like 'batch_create_documents' or 'create_collection'. The purpose is stated but lacks meaningful differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a collectionId), when to use 'batch_create_documents' for multiple documents, or how this differs from 'update_document' for modifying existing documents. There's complete absence of contextual usage information.

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/huiseo/outline-wiki-mcp'

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