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 } ] }

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