Skip to main content
Glama

TransactionCommit

Commit database transactions to finalize changes made during a transaction session, ensuring data persistence and consistency in RushDB.

Instructions

Commit a database transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesTransaction ID

Implementation Reference

  • The main handler function that executes the TransactionCommit tool logic by committing the specified database transaction using db.tx.commit and returning a success response.
    export async function TransactionCommit(params: { transactionId: string }) { const { transactionId } = params const result = await db.tx.commit(transactionId) return { success: true, message: `Transaction '${transactionId}' committed successfully`, data: result.data } }
  • Defines the input schema, description, and registration entry for the TransactionCommit tool in the tools list used for MCP listTools.
    { name: 'TransactionCommit', description: 'Commit a database transaction', inputSchema: { type: 'object', properties: { transactionId: { type: 'string', description: 'Transaction ID' } }, required: ['transactionId'] } },
  • index.ts:493-504 (registration)
    Registers the TransactionCommit handler import and dispatches its execution in the MCP callTool request handler switch statement.
    case 'TransactionCommit': const commitResult = await TransactionCommit({ transactionId: args.transactionId as string }) return { content: [ { type: 'text', text: commitResult.message } ] }
  • index.ts:49-49 (registration)
    Import statement for the TransactionCommit handler function.
    import { TransactionCommit } from './tools/TransactionCommit.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