Skip to main content
Glama

TransactionBegin

Start a new database transaction to group multiple operations, ensuring data consistency and atomic execution within RushDB's graph database system.

Instructions

Begin a new database transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttlNoTTL in milliseconds

Implementation Reference

  • The core handler function that begins a new database transaction using the db.tx.begin method, optionally with a TTL configuration, and returns the transaction ID.
    export async function TransactionBegin(params: { ttl?: number }) { const { ttl } = params const config = ttl ? { ttl } : undefined const transaction = await db.tx.begin(config) return { success: true, transactionId: transaction.id, message: `Transaction started with ID: ${transaction.id}` } }
  • The schema definition for the TransactionBegin tool, including input schema for optional ttl parameter, description, and name. Part of the tools array used for tool discovery.
    { name: 'TransactionBegin', description: 'Begin a new database transaction', inputSchema: { type: 'object', properties: { ttl: { type: 'number', description: 'TTL in milliseconds' } }, required: [] } },
  • index.ts:480-491 (registration)
    Registration in the MCP tool call handler switch statement, dispatching calls to the TransactionBegin function with parsed arguments.
    case 'TransactionBegin': const beginResult = await TransactionBegin({ ttl: args.ttl as number | undefined }) return { content: [ { type: 'text', text: `${beginResult.message}\nTransaction ID: ${beginResult.transactionId}` } ] }
  • index.ts:72-76 (registration)
    Registration of the tools list handler, which exposes the TransactionBegin tool schema via MCP ListTools endpoint.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools } })

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