Skip to main content
Glama

batch_move_documents

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

Instructions

Move multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdsYes
collectionIdNo
parentDocumentIdNo

Implementation Reference

  • The handler function batch_move_documents that executes the batch move operation by calling the Outline API's /documents.move endpoint for each document ID.
    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 schema defining the input for batch_move_documents: array of documentIds, optional collectionId and parentDocumentId.
    export const batchMoveDocumentsSchema = z.object({ documentIds, collectionId: collectionId.optional(), parentDocumentId: z.string().uuid().nullable().optional(), });
  • Tool registration in allTools array, creating the MCP tool definition from the schema.
    createTool( 'batch_move_documents', 'Move multiple documents at once.', 'batch_move_documents' ),
  • Generic helper function runBatch used by the batch_move_documents handler to process multiple items and return a summary.
    async function runBatch<TItem>( items: TItem[], operation: (item: TItem) => Promise<BatchResult> ): Promise<BatchSummary> { const results: BatchResult[] = []; for (const item of items) { results.push(await operation(item)); } const succeeded = results.filter((r) => r.success).length; return { total: results.length, succeeded, failed: results.length - succeeded, results }; }
  • Access control configuration listing batch_move_documents as a write operation tool.
    'batch_move_documents',

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

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