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'
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. 'Rollback' implies a destructive write operation that reverses changes, but the description doesn't specify what gets affected (e.g., data changes undone), potential side effects, error conditions, or required permissions. This is inadequate for a mutation tool with zero annotation coverage.

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, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place without redundancy or unnecessary elaboration.

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?

For a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context like what the rollback entails, success/failure indicators, dependencies on TransactionBegin, or how it interacts with other tools. The agent is left with significant gaps in understanding the tool's behavior and implications.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'transactionId' fully documented in the schema. The description adds no additional meaning about the parameter, such as format examples or context. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 clearly states the verb ('Rollback') and resource ('a database transaction'), making the tool's purpose immediately understandable. It distinguishes itself from siblings like TransactionBegin and TransactionCommit by specifying the rollback action. However, it doesn't explicitly differentiate from other transaction-related tools beyond the name.

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 an active transaction), when-not-to-use scenarios, or how it relates to siblings like TransactionCommit or TransactionGet. The agent must infer usage from the name alone.

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