Skip to main content
Glama
huiseo

Outline Wiki MCP Server

by huiseo

batch_delete_documents

Delete multiple Outline wiki documents simultaneously using their IDs, with options for permanent removal or soft deletion.

Instructions

Delete multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdsYes
permanentNo

Implementation Reference

  • The main handler function for the batch_delete_documents tool. It performs batch deletion of documents using the Outline API, with optional permanent deletion. Uses runBatch helper to process each document ID.
    async batch_delete_documents(args: BatchDeleteDocumentsInput) {
      checkAccess(config, 'batch_delete_documents');
    
      const results = await runBatch(args.documentIds, async (documentId) => {
        try {
          await apiCall(() =>
            apiClient.post('/documents.delete', { id: documentId, permanent: args.permanent })
          );
          return { success: true, documentId };
        } catch (error) {
          return { success: false, documentId, error: getErrorMessage(error) };
        }
      });
    
      return { ...results, permanent: args.permanent };
    },
  • Zod schema definition for the batch_delete_documents tool input: array of documentIds and optional permanent boolean.
    export const batchDeleteDocumentsSchema = z.object({ documentIds, permanent: z.boolean().default(false) });
  • Registration of the batch_delete_documents tool in the allTools array, converting the Zod schema to JSON Schema for MCP.
    createTool(
      'batch_delete_documents',
      'Delete multiple documents at once.',
      'batch_delete_documents'
    ),
  • TypeScript type derived from the batchDeleteDocumentsSchema for use in handlers.
    export type BatchDeleteDocumentsInput = z.infer<typeof batchDeleteDocumentsSchema>;
  • Mapping of the tool name to its schema in the central toolSchemas object used by tool definitions.
    batch_delete_documents: batchDeleteDocumentsSchema,
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. It mentions deletion but fails to disclose critical behavioral traits: whether deletion is reversible (e.g., via 'permanent' parameter), permission requirements, rate limits, or error handling for invalid IDs. This is inadequate for a destructive operation.

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 is front-loaded and directly conveys the core action, making it highly concise and well-structured for quick understanding.

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 tool's destructive nature, lack of annotations, no output schema, and low schema coverage, the description is incomplete. It omits essential context like return values, error conditions, and safety warnings, which are crucial for a batch deletion tool.

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

Parameters3/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 implies 'documentIds' as input but does not explain the 'permanent' parameter or provide any semantic details beyond the schema. Since it adds minimal value, the score reflects a baseline with some compensation for hinting at parameters.

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 ('Delete multiple documents at once') and specifies the resource ('documents'), making the purpose unambiguous. However, it does not differentiate from the sibling tool 'delete_document', which handles single deletions, leaving room for improvement in sibling distinction.

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 'delete_document' for single deletions or 'batch_archive_documents' for archiving. It lacks context on prerequisites, such as needing document IDs, or exclusions, leaving the agent without usage direction.

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

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