Skip to main content
Glama
mrwyndham

PocketBase MCP Server

delete_record

Remove specific records from PocketBase database collections by specifying the collection name and record ID to manage data effectively.

Instructions

Delete a record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionYesCollection name
idYesRecord ID

Implementation Reference

  • The main handler function for the 'delete_record' tool. It deletes the specified record from the given PocketBase collection and returns a success message or throws an error.
    private async deleteRecord(args: any) {
      try {
        await this.pb.collection(args.collection).delete(args.id);
        return {
          content: [
            {
              type: 'text',
              text: `Successfully deleted record ${args.id} from collection ${args.collection}`,
            },
          ],
        };
      } catch (error: unknown) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to delete record: ${pocketbaseErrorMessage(error)}`
        );
      }
    }
  • The input schema defining the required 'collection' and 'id' parameters for the delete_record tool.
    inputSchema: {
      type: 'object',
      properties: {
        collection: {
          type: 'string',
          description: 'Collection name',
        },
        id: {
          type: 'string',
          description: 'Record ID',
        },
      },
      required: ['collection', 'id'],
    },
  • src/index.ts:272-289 (registration)
    The tool registration object including name, description, and input schema, added to the list of tools provided to the MCP server.
    {
      name: 'delete_record',
      description: 'Delete a record',
      inputSchema: {
        type: 'object',
        properties: {
          collection: {
            type: 'string',
            description: 'Collection name',
          },
          id: {
            type: 'string',
            description: 'Record ID',
          },
        },
        required: ['collection', 'id'],
      },
    },
  • src/index.ts:681-682 (registration)
    The switch case in the request handler that routes 'delete_record' calls to the deleteRecord method.
    case 'delete_record':
      return await this.deleteRecord(request.params.arguments);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Delete a record' implies a destructive, irreversible mutation, but it doesn't specify consequences (e.g., data loss, audit trails), permissions required, or error handling. This is inadequate for a destructive tool with zero annotation coverage.

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 extremely concise with a single sentence, 'Delete a record', which is front-loaded and wastes no words. It efficiently communicates the core action 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 this is a destructive mutation tool with no annotations and no output schema, the description is incomplete. It fails to address critical aspects like what happens post-deletion, error cases, or return values, leaving significant gaps for an AI agent to understand the tool's behavior.

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 100%, with clear descriptions for 'collection' and 'id' parameters. The description adds no additional meaning beyond the schema, such as format examples or constraints, but the schema itself is well-documented, meeting the baseline for adequate parameter semantics.

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 'Delete a record' states a clear verb ('Delete') and resource ('record'), but it's vague about what type of record is being deleted and doesn't distinguish it from sibling tools like 'delete_collection' or 'update_record'. It provides basic purpose but lacks specificity.

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 offers no guidance on when to use this tool versus alternatives like 'delete_collection' or 'update_record', nor does it mention prerequisites such as authentication or permissions. It's a bare statement with no contextual usage information.

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/mrwyndham/pocketbase-mcp'

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