Skip to main content
Glama

DeleteRecordById

Remove a specific record from RushDB using its unique identifier. Specify the record ID to delete data from the graph database, with optional transaction support for atomic operations.

Instructions

Delete a record by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordIdYesID of the record to delete
transactionIdNoOptional transaction ID for atomic deletion

Implementation Reference

  • The primary handler function that deletes the specified record by ID using the database utility and returns a success message.
    export async function DeleteRecordById(params: { recordId: string; transactionId?: string }) {
      const { recordId, transactionId } = params
    
      await db.records.deleteById(recordId, transactionId)
    
      return {
        success: true,
        message: `Record '${recordId}' deleted successfully`
      }
    }
  • tools.ts:359-370 (registration)
    Tool registration entry defining the name, description, and input schema for DeleteRecordById in the exported tools array.
    {
      name: 'DeleteRecordById',
      description: 'Delete a record by its ID',
      inputSchema: {
        type: 'object',
        properties: {
          recordId: { type: 'string', description: 'ID of the record to delete' },
          transactionId: { type: 'string', description: 'Optional transaction ID for atomic deletion' }
        },
        required: ['recordId']
      }
    },
  • Input schema definition for validating parameters to the DeleteRecordById tool.
    inputSchema: {
      type: 'object',
      properties: {
        recordId: { type: 'string', description: 'ID of the record to delete' },
        transactionId: { type: 'string', description: 'Optional transaction ID for atomic deletion' }
      },
      required: ['recordId']
  • Dispatch handler in the MCP server that calls the DeleteRecordById function based on tool name.
    case 'DeleteRecordById':
      const deleteByIdResult = await DeleteRecordById({
        recordId: args.recordId as string,
        transactionId: args.transactionId as string | undefined
      })
      return {
        content: [
          {
            type: 'text',
            text: deleteByIdResult.message
          }
        ]
      }
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 the tool deletes a record, implying a destructive mutation, but fails to mention critical aspects like whether deletion is permanent, requires specific permissions, has side effects (e.g., cascading deletions), or what happens on success/failure. 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, direct sentence that efficiently conveys the core action without any wasted words. It is front-loaded with the key verb 'Delete', making it easy to scan and understand immediately, which is ideal for conciseness in tool descriptions.

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, and absence of an output schema, the description is insufficiently complete. It does not address behavioral risks, return values, or error conditions, which are critical for safe invocation. For a deletion tool with no structured safety hints, more context is needed to guide the agent effectively.

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?

The input schema has 100% description coverage, clearly documenting both parameters ('recordId' as required and 'transactionId' as optional). The description adds no additional semantic context beyond implying the use of an ID, so it meets the baseline of 3 where the schema does the heavy lifting without compensating for any gaps.

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') and target resource ('a record by its ID'), making the purpose immediately understandable. It distinguishes itself from sibling tools like 'DeleteRecord' or 'BulkDeleteRecords' by specifying the 'by ID' method, though it doesn't explicitly contrast with them. The description avoids tautology by not merely restating the tool name.

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 'DeleteRecord' or 'BulkDeleteRecords', nor does it mention prerequisites such as needing the record ID. The description implies usage for deletion by ID but offers no context on exclusions or best practices, 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

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/rush-db/RushDB'

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