Skip to main content
Glama
huiseo
by huiseo

batch_delete_documents

Delete multiple Outline wiki documents simultaneously to manage content efficiently. Specify document IDs and choose permanent deletion when needed.

Instructions

Delete multiple documents at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdsYes
permanentNo

Implementation Reference

  • The primary handler function that executes the batch deletion by calling the Outline API's /documents.delete endpoint for each document ID in the input array, handling errors and returning a batch summary with success/failure counts and details. Supports permanent deletion flag.
    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 defining the input for batch_delete_documents: an array of documentIds (required) and permanent boolean (optional, defaults to false).
    export const batchDeleteDocumentsSchema = z.object({ documentIds, permanent: z.boolean().default(false) });
  • Registration of the batch_delete_documents tool in the allTools array, providing name, description, and schema reference for MCP tool definition.
      'batch_delete_documents',
      'Delete multiple documents at once.',
      'batch_delete_documents'
    ),
  • Mapping of tool name 'batch_delete_documents' to its Zod schema in the central toolSchemas record.
    batch_delete_documents: batchDeleteDocumentsSchema,
  • Access control helper that includes 'batch_delete_documents' in the set of delete tools, used to enforce restrictions if DISABLE_DELETE is enabled.
    const DELETE_TOOLS = new Set([
      'delete_document',
      'delete_collection',
      'batch_delete_documents',
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 only states the action ('Delete') without behavioral details. It doesn't disclose whether deletions are reversible, require specific permissions, have rate limits, or confirm success/failure outcomes, which is critical for a destructive batch 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 zero wasted words, making it easy to parse. It's appropriately sized for the tool's complexity and front-loads the core action, though this brevity contributes to gaps 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?

For a destructive batch tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks details on behavior, parameters, error handling, and comparisons to siblings, failing to provide adequate context 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 but adds no parameter semantics. It doesn't explain what 'documentIds' represents (e.g., format, source) or the implications of the 'permanent' flag (e.g., trash vs. irreversible deletion), leaving parameters poorly understood beyond the schema's structure.

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 verb ('Delete') and resource ('multiple documents at once'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'delete_document' (singular) or 'batch_archive_documents', which would require explicit comparison to achieve a perfect score.

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. It doesn't mention sibling tools like 'delete_document' for single deletions, 'batch_archive_documents' for non-destructive removal, or 'list_trash' for checking deletable items, leaving the agent without context for tool selection.

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