Skip to main content
Glama
huiseo
by huiseo

move_document

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

Instructions

Move document to another collection or under a parent document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYes
collectionIdNo
parentDocumentIdNo

Implementation Reference

  • Core handler function that executes the move_document tool by constructing payload and calling Outline API /documents.move endpoint.
    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 input parameters for move_document tool (documentId required, collectionId and parentDocumentId optional).
    export const moveDocumentSchema = z.object({
      documentId,
      collectionId: collectionId.optional(),
      parentDocumentId: z.string().uuid().nullable().optional(),
    });
  • src/lib/tools.ts:85-89 (registration)
    Registers the move_document tool in the allTools array with its name, description, and schema reference for MCP tool discovery.
    createTool(
      'move_document',
      'Move document to another collection or under a parent document.',
      'move_document'
    ),
  • Composes all handlers including document handlers (which contain move_document) into the unified ToolHandlers object.
    export function createAllHandlers(ctx: AppContext): ToolHandlers {
      return {
        ...createSearchHandlers(ctx),
        ...createDocumentHandlers(ctx),
        ...createCollectionHandlers(ctx),
        ...createCommentHandlers(ctx),
        ...createBatchHandlers(ctx),
        ...createSmartHandlers(ctx),
      } as ToolHandlers;
    }
  • Maps the move_document tool name to its schema in the central toolSchemas object used by tool definitions.
    move_document: moveDocumentSchema,
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions the move action but doesn't disclose permissions needed, whether it's destructive (e.g., affects document links), rate limits, or what happens to the original location. For a mutation tool with zero annotation coverage, this is inadequate.

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 zero waste—front-loaded with the core action and destination options. Every word earns its place, making it easy to parse quickly without unnecessary elaboration.

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 a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, parameter meanings, return values, and usage context, leaving significant gaps for the agent to operate effectively.

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 but fails to do so. It mentions 'collection' and 'parent document' as destinations, hinting at parameters like 'collectionId' and 'parentDocumentId', but doesn't explain their semantics, relationships, or that 'documentId' is required. This leaves key parameters undocumented.

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 ('document'), specifying the destination options ('to another collection or under a parent document'). It distinguishes from siblings like 'batch_move_documents' by implying single-document operation, though not explicitly. However, it doesn't fully differentiate from 'update_document' which might also handle location changes, keeping it at 4 rather than 5.

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 explicit guidance on when to use this tool versus alternatives like 'batch_move_documents' or 'update_document'. The description implies usage for moving documents but lacks context on prerequisites, constraints, or comparisons with sibling tools. This leaves the agent without clear decision-making criteria.

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