Skip to main content
Glama

TransactionBegin

Start a database transaction to manage data operations with atomicity and consistency in RushDB's graph database.

Instructions

Begin a new database transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttlNoTTL in milliseconds

Implementation Reference

  • The core handler function that implements the TransactionBegin tool logic, initiating a database transaction with optional TTL.
    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}`
      }
    }
  • Input schema for the TransactionBegin tool defining the optional 'ttl' parameter of type number.
    inputSchema: {
      type: 'object',
      properties: { ttl: { type: 'number', description: 'TTL in milliseconds' } },
      required: []
    }
  • tools.ts:422-430 (registration)
    Registration entry for TransactionBegin in the tools array used for MCP listTools response.
    {
      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)
    Dispatch case in MCP CallToolRequestSchema handler that invokes the TransactionBegin tool.
    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:48-48 (registration)
    Import statement for the TransactionBegin handler function.
    import { TransactionBegin } from './tools/TransactionBegin.js'
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Begin') but doesn't explain what a database transaction entails, whether it requires specific permissions, if it's reversible, what happens on failure, or any rate limits. This leaves significant gaps for a tool that initiates a potentially state-changing operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse, which is ideal for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of initiating a database transaction, the lack of annotations and output schema, and the description's minimal detail, this is incomplete. It doesn't cover behavioral aspects, return values, or integration with sibling tools, leaving the agent with insufficient context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 100% description coverage, so the schema fully documents the TTL parameter. The description adds no parameter-specific information, but with 0 required parameters and high schema coverage, a baseline of 3 is appropriate. The slight boost to 4 reflects that the description implies the tool's purpose without needing parameter details, though it doesn't compensate for any gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Begin a new database transaction' clearly states the action (begin) and resource (database transaction), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling transaction tools like TransactionCommit or TransactionRollback, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing to be in a transaction-aware context), when to avoid it, or how it relates to sibling tools like TransactionCommit or TransactionRollback, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/rush-db/RushDB'

If you have feedback or need assistance with the MCP directory API, please join our Discord server