Skip to main content
Glama

DeleteRecordById

Remove a specific record from RushDB using its unique identifier. This tool enables precise data deletion by record ID, 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

  • Main handler function that deletes the record by ID using the database utility.
    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` } }
  • Input schema, description, and registration entry for the DeleteRecordById tool in the tools list.
    { 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'] } },
  • index.ts:396-408 (registration)
    Dispatcher case in the MCP CallToolRequestSchema handler that invokes the DeleteRecordById function.
    case 'DeleteRecordById': const deleteByIdResult = await DeleteRecordById({ recordId: args.recordId as string, transactionId: args.transactionId as string | undefined }) return { content: [ { type: 'text', text: deleteByIdResult.message } ] }
  • index.ts:72-75 (registration)
    Registration of the listTools capability that returns the tools array including DeleteRecordById.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/1pxone/RushDB'

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