Skip to main content
Glama
DynamicEndpoints

Document Extractor MCP Server

delete_document

Remove a stored document from PocketBase by specifying its unique ID to manage your extracted documentation collection.

Instructions

Delete a document from PocketBase by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDocument ID to delete

Implementation Reference

  • The helper function that performs the actual deletion in the PocketBase collection.
    async function deleteDocument(id) {
      await authenticateWhenNeeded();
      try {
        await pb.collection(DOCUMENTS_COLLECTION).delete(id);
        debugLog('Document deleted from PocketBase', { id });
        return true;
      } catch (error) {
        debugLog('Error deleting document', { error: error.message, id });
        throw new Error(`Failed to delete document: ${error.message}`);
      }
    }
  • server.js:610-626 (registration)
    The registration of the 'delete_document' MCP tool, which calls the deleteDocument handler.
    server.tool(
      'delete_document',
      'Delete a document from PocketBase by ID',
      {
        id: z.string().min(1, 'Document ID is required').describe('Document ID to delete')
      },
      async ({ id }) => {
        try {
          await authenticateWhenNeeded();
          
          await deleteDocument(id);
          
          return {
            content: [{
              type: 'text',
              text: `🗑️ Document with ID "${id}" has been deleted successfully.`
            }]
Behavior2/5

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

No annotations provided, so description must carry full behavioral burden. Merely restates the operation name 'Delete' without disclosing permanence, failure modes (e.g., if ID not found), or side effects. Lacks critical safety context 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?

Nine words, front-loaded with action verb, zero redundancy. Every word earns its place in conveying the essential operation.

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

Completeness3/5

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

Adequate for a single-parameter operation with complete schema documentation, but minimum-viable given the destructive nature. Missing warnings about data loss that should compensate for lack of destructiveHint annotation.

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 coverage is 100% with clear parameter description ('Document ID to delete'). Main descriptionč…ąadds 'by ID' which aligns with schema but doesn't add syntax details, validation behavior, or format requirements beyond what the schema already provides. Baseline 3 appropriate for high-coverage schema.

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?

Clear specific verb ('Delete'), resource ('document'), and scope ('from PocketBase by ID'). Implicitly distinguishes from read siblings (get_document, extract_document, etc.) by naming the destructive operation, though it doesn't explicitly contrast with them.

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?

Provides no guidance on when to use versus alternatives, no warnings about permanent data loss, and no prerequisites (e.g., authentication requirements despite 'authenticate' sibling existing).

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/DynamicEndpoints/documentation-mcp-using-pocketbase'

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