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
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes | ||
| collectionId | No | ||
| parentDocumentId | No |
Implementation Reference
- src/lib/handlers/documents.ts:91-106 (handler)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, }; },
- src/lib/schemas.ts:57-61 (schema)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' ),