Skip to main content
Glama

move_document

Relocate documents between collections or reposition them under parent documents to organize content structure in Outline wiki.

Instructions

Move document to another collection or under a parent document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes
collectionIdNo
parentDocumentIdNo

Implementation Reference

  • The core handler function that implements the move_document tool logic. It performs access check, constructs payload from input args, calls the Outline API endpoint '/documents.move', and returns formatted result with updated collectionId and parentDocumentId.
    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 defining the input validation for move_document tool: requires documentId, optional collectionId (UUID), optional nullable parentDocumentId (UUID).
    export const moveDocumentSchema = z.object({ documentId, collectionId: collectionId.optional(), parentDocumentId: z.string().uuid().nullable().optional(), });
  • src/lib/tools.ts:85-89 (registration)
    Tool registration in the allTools array, defining the name, description, and linking to the Zod schema for JSON Schema conversion used in MCP tool definitions.
    createTool( 'move_document', 'Move document to another collection or under a parent document.', 'move_document' ),
  • Maps the move_document tool name to its Zod schema in the central toolSchemas object used by tool definitions.
    move_document: moveDocumentSchema,
  • Includes 'move_document' in the WRITE_TOOLS Set for access control checks in read-only mode.
    '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