Skip to main content
Glama

move_document

Move a document to a different collection or reposition it under a parent document within Outline wiki for better organization.

Instructions

Move document to another collection or under a parent document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes
collectionIdNo
parentDocumentIdNo

Implementation Reference

  • The handler function that executes the move_document tool. It checks access, builds payload with documentId, optional collectionId and parentDocumentId, calls Outline API /documents.move, and returns formatted result with new locations.
    async move_document(args: MoveDocumentInput) { checkAccess(config, 'move_document'); const payload: Record<string, unknown> = { id: args.documentId }; if (args.collectionId) payload.collectionId = args.collectionId; if (args.parentDocumentId !== undefined) payload.parentDocumentId = args.parentDocumentId; const { data } = await apiCall(() => apiClient.post<OutlineDocument>('/documents.move', payload) ); return { ...docResult(data, MESSAGES.DOCUMENT_MOVED), collectionId: data.collectionId, parentDocumentId: data.parentDocumentId, }; },
  • Zod schema for move_document input validation: requires documentId, optional collectionId (UUID), optional nullable parentDocumentId (UUID). Referenced in toolSchemas and type MoveDocumentInput.
    export const moveDocumentSchema = z.object({ documentId, collectionId: collectionId.optional(), parentDocumentId: z.string().uuid().nullable().optional(), });
  • src/lib/tools.ts:86-89 (registration)
    Registers the move_document tool in the allTools array using createTool with name, description, and schema key 'move_document', converting Zod schema to JSON Schema for MCP.
    'move_document', 'Move document to another collection or under a parent document.', 'move_document' ),

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