Skip to main content
Glama

TransactionRollback

Undo database changes by rolling back a specific transaction, ensuring data integrity when modifications need to be reversed in the RushDB graph database.

Instructions

Rollback a database transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesTransaction ID

Implementation Reference

  • The core handler function that performs the transaction rollback using the database transaction client db.tx.rollback and returns a success response including the result data.
    export async function TransactionRollback(params: { transactionId: string }) { const { transactionId } = params const result = await db.tx.rollback(transactionId) return { success: true, message: `Transaction '${transactionId}' rolled back successfully`, data: result.data } }
  • tools.ts:440-448 (registration)
    Registers the TransactionRollback tool in the tools array exported for MCP ListTools, defining its name, description, and input schema.
    { name: 'TransactionRollback', description: 'Rollback a database transaction', inputSchema: { type: 'object', properties: { transactionId: { type: 'string', description: 'Transaction ID' } }, required: ['transactionId'] } },
  • Input schema definition for the TransactionRollback tool, specifying the required transactionId parameter.
    inputSchema: { type: 'object', properties: { transactionId: { type: 'string', description: 'Transaction ID' } }, required: ['transactionId'] }
  • Dispatch handler in the MCP server's CallToolRequestSchema that calls the TransactionRollback function with parsed arguments and returns the result message as text content.
    case 'TransactionRollback': const rollbackResult = await TransactionRollback({ transactionId: args.transactionId as string }) return { content: [ { type: 'text', text: rollbackResult.message } ] }
  • index.ts:50-50 (registration)
    Import statement bringing the TransactionRollback handler into the main index for use in tool dispatching.
    import { TransactionRollback } from './tools/TransactionRollback.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