Skip to main content
Glama

DeleteRecord

Remove a specific record from the RushDB database using its unique identifier. Supports optional transaction IDs for atomic deletion operations.

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 execution logic for the DeleteRecord tool: deletes the specified record using the database client and returns a success confirmation.
    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 for input validation: requires recordId string, optional transactionId.
    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'] }
  • tools.ts:103-114 (registration)
    MCP tool registration: defines name, description, and input schema used for tool listing and validation.
    { 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)
    Dispatcher in main MCP server: imports and invokes the DeleteRecord handler based on tool name.
    case 'DeleteRecord': const deleteResult = await DeleteRecord({ recordId: args.recordId as string, transactionId: args.transactionId as string | undefined }) return { content: [ { type: 'text', text: deleteResult.message } ] }
  • index.ts:29-29 (registration)
    Import statement resolving to the DeleteRecord handler implementation.
    import { DeleteRecord } from './tools/DeleteRecord.js'

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/1pxone/RushDB'

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