Skip to main content
Glama

DeleteRecord

Remove specific records from RushDB database by ID, supporting optional transaction-based atomic deletions for data integrity.

Instructions

Delete a record from the database (alias of DeleteRecordById)

Input Schema

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

Implementation Reference

  • The core handler function for the DeleteRecord tool that performs the database deletion operation.
    export async function DeleteRecord(params: { recordId: string; transactionId?: string }) {
      const { recordId, transactionId } = params
    
      await db.records.deleteById(recordId, transactionId)
    
      return {
        success: true,
        message: `Record '${recordId}' deleted successfully`
      }
    }
  • JSON schema defining the input parameters for the DeleteRecord tool, used in MCP tool listing.
      name: 'DeleteRecord',
      description: 'Delete a record from the database (alias of DeleteRecordById)',
      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']
      }
    },
  • index.ts:168-180 (registration)
    Dispatching logic in the MCP CallToolRequest handler that routes DeleteRecord tool calls to the imported handler function.
    case 'DeleteRecord':
      const deleteResult = await DeleteRecord({
        recordId: args.recordId as string,
        transactionId: args.transactionId as string | undefined
      })
      return {
        content: [
          {
            type: 'text',
            text: deleteResult.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 this is a deletion operation, which implies destructive behavior, but doesn't mention whether deletions are permanent, reversible, require specific permissions, or have side effects. The mention of 'transactionId' in the schema suggests atomic operations, but the description doesn't explain this behavioral aspect.

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 - a single sentence that communicates the core purpose and relationship to another tool. Every word earns its place with no wasted text. The information is front-loaded and immediately understandable.

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 operation with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after deletion, whether there are confirmation prompts, what the return value might be, or error conditions. The transaction capability hinted in the schema isn't explained in the description, leaving important behavioral context undocumented.

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%, so both parameters are documented in the schema. The description adds no additional parameter information beyond what's in the schema. It doesn't explain the relationship between recordId and transactionId or provide usage examples. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 resource ('a record from the database'), making the purpose immediately understandable. It also mentions it's an alias of DeleteRecordById, which helps distinguish it from other deletion tools like BulkDeleteRecords. However, it doesn't fully differentiate from DeleteRecordById since they appear to be functionally identical.

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 like BulkDeleteRecords or DeleteRecordById. While it mentions being an alias of DeleteRecordById, it doesn't explain why one would choose this tool over that one or when to use it versus other deletion methods. No context about prerequisites or exclusions is provided.

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