Skip to main content
Glama
huiseo
by huiseo

batch_create_documents

Create multiple documents simultaneously in Outline wiki to save time when adding content to collections.

Instructions

Create multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentsYes

Implementation Reference

  • The main handler function for batch_create_documents. It checks access, then uses runBatch to create multiple documents via API calls to '/documents.create', handling errors and returning batch summary.
    async batch_create_documents(args: BatchCreateDocumentsInput) {
      checkAccess(config, 'batch_create_documents');
    
      return runBatch(args.documents, async (doc) => {
        try {
          const { data } = await apiCall(() =>
            apiClient.post<OutlineDocument>('/documents.create', {
              title: doc.title,
              text: doc.text,
              collectionId: doc.collectionId,
              parentDocumentId: doc.parentDocumentId,
              publish: doc.publish,
            })
          );
          return { success: true, id: data.id, title: data.title };
        } catch (error) {
          return { success: false, title: doc.title, error: getErrorMessage(error) };
        }
      });
    },
  • Zod schema definition for batchCreateDocuments input, validating an array of document objects with title, text, collectionId, etc.
    export const batchCreateDocumentsSchema = z.object({
      documents: z.array(z.object({
        title: z.string().min(1),
        text: z.string().default(''),
        collectionId,
        parentDocumentId: z.string().uuid().optional(),
        publish: z.boolean().default(true),
      })).min(1, 'At least one document is required'),
    });
  • Tool registration in allTools array using createTool, which converts the Zod schema to JSON schema for MCP tool definition.
    'batch_create_documents',
    'Create multiple documents at once.',
    'batch_create_documents'
Behavior2/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. 'Create' implies a write operation, but it does not disclose behavioral traits such as permissions required, whether it's idempotent, rate limits, error handling for partial failures, or what happens on success (e.g., returns IDs). This is a significant gap for a mutation tool.

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. It is front-loaded and appropriately sized for the tool's complexity, though this conciseness comes at the cost of detail in other dimensions.

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 (batch creation with nested objects), lack of annotations, no output schema, and 0% schema description coverage, the description is incomplete. It fails to address key aspects like return values, error handling, or system context, making it inadequate for safe and effective use by an agent.

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. It mentions 'multiple documents' but adds no meaning beyond what the schema's 'documents' array implies. It does not explain the semantics of nested fields (e.g., 'title', 'collectionId'), default behaviors (e.g., 'publish' defaults to true), or constraints, leaving parameters largely undocumented.

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

Purpose3/5

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

The description 'Create multiple documents at once' clearly states the verb ('create') and resource ('documents'), and the 'multiple...at once' distinguishes it from the sibling 'create_document'. However, it lacks specificity about what documents are (e.g., wiki pages, notes) or the system context, making it somewhat vague.

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?

The description provides no guidance on when to use this tool versus alternatives like 'create_document' (for single documents) or 'batch_update_documents' (for updates). It mentions 'multiple documents at once' but does not specify scenarios, prerequisites, or exclusions, leaving the agent to infer usage from the name alone.

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