Skip to main content
Glama

TransactionRollback

Undo database changes by rolling back a transaction in RushDB. Use this tool to revert operations when errors occur or changes need to be canceled.

Instructions

Rollback a database transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesTransaction ID

Implementation Reference

  • The main handler function that executes the TransactionRollback tool logic by calling db.tx.rollback(transactionId) and returning success message with 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 } }
  • Input schema definition for the TransactionRollback tool, specifying transactionId as required string.
    { name: 'TransactionRollback', description: 'Rollback a database transaction', inputSchema: { type: 'object', properties: { transactionId: { type: 'string', description: 'Transaction ID' } }, required: ['transactionId'] } },
  • index.ts:506-517 (registration)
    Registration in the MCP tool call handler switch statement, dispatching to the TransactionRollback function.
    case 'TransactionRollback': const rollbackResult = await TransactionRollback({ transactionId: args.transactionId as string }) return { content: [ { type: 'text', text: rollbackResult.message } ] }
  • index.ts:50-50 (registration)
    Import of the TransactionRollback handler function for use in the MCP server.
    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