Skip to main content
Glama
huiseo
by huiseo

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',
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action ('move multiple documents') without details on permissions, side effects, rate limits, or response format. For a mutation tool with zero annotation coverage, this is inadequate and leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse. Every word contributes to the purpose, achieving optimal conciseness for such a brief statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a batch mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on behavior, parameters, and outcomes, making it insufficient for an agent to use the tool effectively without additional context or trial-and-error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'multiple documents' which hints at 'documentIds', but doesn't explain 'collectionId' or 'parentDocumentId' or their roles in the move operation. The description adds minimal value beyond the schema, failing to clarify parameter meanings or usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('move') and resource ('multiple documents'), specifying it's a batch operation ('at once'). It distinguishes from the sibling 'move_document' by emphasizing multiple documents, though it doesn't explicitly name the sibling. The purpose is specific but could be more detailed about what 'move' entails.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'move_document' or 'batch_update_documents'. The description implies usage for moving multiple documents, but lacks explicit context, prerequisites, or exclusions. It's a basic statement without operational guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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