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
| Name | Required | Description | Default |
|---|---|---|---|
| recordId | Yes | ID of the record to delete | |
| transactionId | No | Optional transaction ID for atomic deletion |
Implementation Reference
- tools/DeleteRecordById.ts:17-26 (handler)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'] } },
- tools.ts:362-368 (schema)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']
- index.ts:396-408 (handler)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 } ] }