Skip to main content
Glama

batch_move_documents

Move multiple Outline wiki documents simultaneously to reorganize content efficiently. Specify document IDs and target collection or parent document.

Instructions

Move multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdsYes
collectionIdNo
parentDocumentIdNo

Implementation Reference

  • The core handler function for the batch_move_documents tool. It performs access check, then batches API calls to move each document to the specified collection or parent using the Outline /documents.move endpoint.
    async batch_move_documents(args: BatchMoveDocumentsInput) { checkAccess(config, 'batch_move_documents'); return runBatch(args.documentIds, async (documentId) => { try { const payload: Record<string, unknown> = { id: 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 { success: true, id: data.id, title: data.title }; } catch (error) { return { success: false, documentId, error: getErrorMessage(error) }; } }); },
  • Zod input schema definition for batch_move_documents tool, validating documentIds array and optional collectionId/parentDocumentId.
    export const batchMoveDocumentsSchema = z.object({ documentIds, collectionId: collectionId.optional(), parentDocumentId: z.string().uuid().nullable().optional(), });
  • Registers the batch_move_documents tool in the allTools array by creating a ToolDefinition from its Zod schema.
    createTool( 'batch_move_documents', 'Move multiple documents at once.', 'batch_move_documents' ),
  • Maps the batchMoveDocumentsSchema to the 'batch_move_documents' tool name in the central toolSchemas record.
    batch_move_documents: batchMoveDocumentsSchema,
  • The createBatchHandlers factory function that produces the handler object including batch_move_documents.
    } export function createBatchHandlers({ 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