Skip to main content
Glama

delete_record

Remove a specific record from a resource by specifying its URI and record ID. Ideal for maintaining up-to-date and accurate data in your MCP Template server.

Instructions

Delete a record from a resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordIdYesID of the record to delete
resourceUriYesURI of the resource

Implementation Reference

  • Tool handler for 'delete_record' that validates arguments and calls dataService.deleteRecord, returning success status.
    case 'delete_record': {
      return await safeExecute(toolName, async () => {
        const args = validateInput(DeleteRecordArgsSchema, request.params.arguments);
        const success = await this.dataService.deleteRecord(args.resourceUri, args.recordId);
        return { success, id: args.recordId };
      });
    }
  • Zod input schema defining resourceUri and recordId for the delete_record tool.
    export const DeleteRecordArgsSchema = z.object({
      resourceUri: z.string().describe('URI of the resource'),
      recordId: z.string().describe('ID of the record to delete'),
    });
  • Tool registration in handleListTools method, providing name, description, and input schema.
    {
      name: 'delete_record',
      description: 'Delete a record from a resource',
      inputSchema: getInputSchema(DeleteRecordArgsSchema),
    },
  • Core implementation of deleteRecord in InMemoryDataService, which deletes the record by ID from the in-memory Map.
    public async deleteRecord(uri: string, id: string): Promise<boolean> {
      this.validateResource(uri);
      
      const resourceData = this.data.get(uri)!;
      
      if (!resourceData.has(id)) {
        throw new Error(`Record not found: ${id}`);
      }
      
      return resourceData.delete(id);
    }
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. It states 'Delete' implies a destructive mutation, but fails to mention critical aspects like permissions required, whether deletion is permanent or reversible, side effects on related data, or error handling. This leaves significant gaps 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 zero waste—it directly states the action and resource without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 complexity (a destructive mutation with no annotations and no output schema), the description is inadequate. It lacks details on behavioral traits, error cases, return values, or how it fits with siblings, leaving the agent under-informed for safe and effective use.

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 both parameters ('recordId' and 'resourceUri'). The description adds no additional meaning beyond what the schema provides, such as format examples or interdependencies, so it meets the baseline for high schema coverage without enhancing parameter understanding.

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 ('record from a resource'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'update_record' or 'create_record' beyond the obvious action difference, missing specific scope or constraints that would warrant a 5.

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?

No guidance is provided on when to use this tool versus alternatives like 'update_record' or 'create_record', nor any prerequisites or exclusions. The description merely states what it does without context, leaving the agent to infer usage from the tool 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

Related 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/kbhuw/MCP_TEMPLATE'

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