Skip to main content
Glama
cwilby
by cwilby

start-transaction

Initiate a new transaction in Microsoft SQL Server using the MCP server, enabling AI assistants to manage database operations through configurable connections.

Instructions

Start a new transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'start-transaction' tool. It generates a random UUID for the transaction ID, starts a database transaction using database.startTransaction(), stores the transaction in the class's transactions Map, and returns a success message with the ID.
    async startTransaction() { const transactionId = crypto.randomUUID(); const transaction = await database.startTransaction(); this.transactions.set(transactionId, transaction); return this.toResult(`Transaction started with ID: ${transactionId}. You can use this ID to commit or rollback the transaction later.`); }
  • Registration of the 'start-transaction' tool in the static create method of TransactionTools class, using server.tool() with no input schema (empty args) and binding the startTransaction handler.
    server.tool( "start-transaction", "Start a new transaction", tools.startTransaction.bind(tools) );

Other Tools

Related 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/cwilby/mcp-node-mssql'

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