Skip to main content
Glama
huiseo

Outline Wiki MCP Server

by huiseo

create_document

Create new documents in Outline wiki with specified titles, content, and collection organization for structured knowledge management.

Instructions

Create a new document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
textNo
collectionIdYes
parentDocumentIdNo
publishNo

Implementation Reference

  • The main handler function for the 'create_document' tool. It performs access check and calls the Outline API to create a new document with the provided title, text, collection, parent, and publish settings.
    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 create_document: title (required), text (optional), collectionId (optional UUID), parentDocumentId (optional UUID), publish (boolean, default true).
    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),
    });
  • src/lib/tools.ts:75-79 (registration)
    Tool registration in the allTools array using createTool, specifying name 'create_document', description, and schema key.
    createTool(
      'create_document',
      'Create a new document.',
      'create_document'
    ),
  • Mapping of 'create_document' tool name to its schema in the toolSchemas object used by createTool.
    create_document: createDocumentSchema,
  • The createDocumentHandlers factory function that returns an object containing the create_document handler, among others. This is imported and spread in handlers/index.ts.
    export function createDocumentHandlers({ apiClient, apiCall, config }: AppContext) {

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-smart-mcp'

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