Skip to main content
Glama

TransactionCommit

Commit database transactions in RushDB to finalize changes and ensure data persistence, using a transaction ID to identify specific operations.

Instructions

Commit a database transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesTransaction ID

Implementation Reference

  • The core handler function that executes the TransactionCommit tool logic by committing the specified database transaction using the db.tx.commit method 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 } }
  • tools.ts:431-439 (registration)
    Registration of the TransactionCommit tool in the tools array exported for MCP listTools, including name, description, and input schema validation.
    { name: 'TransactionCommit', description: 'Commit a database transaction', inputSchema: { type: 'object', properties: { transactionId: { type: 'string', description: 'Transaction ID' } }, required: ['transactionId'] } },
  • Input schema definition for the TransactionCommit tool, specifying the required transactionId parameter.
    inputSchema: { type: 'object', properties: { transactionId: { type: 'string', description: 'Transaction ID' } }, required: ['transactionId'] }
  • index.ts:493-504 (registration)
    Dispatch and invocation of the TransactionCommit handler within the MCP CallToolRequest handler switch statement.
    case 'TransactionCommit': const commitResult = await TransactionCommit({ transactionId: args.transactionId as string }) return { content: [ { type: 'text', text: commitResult.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