Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

confirm_transaction

Verify the status of a Solana transaction using the specified signature. Confirm whether the transaction is finalized, confirmed, or processed for accurate on-chain activity tracking.

Instructions

Confirm the transaction identified by the specified signature.

Args: tx_sig (str): Transaction signature to confirm commitment (Optional[str]): Bank state to query ("finalized", "confirmed" or "processed")

Returns: str: Transaction confirmation status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo
tx_sigYes

Implementation Reference

  • The main handler function for the 'confirm_transaction' MCP tool. It is registered via the @mcp.tool() decorator and implements the logic to confirm a Solana transaction signature using the Solana AsyncClient, supporting optional commitment level.
    @mcp.tool() async def confirm_transaction(tx_sig: str, commitment: Optional[str] = None) -> str: """Confirm the transaction identified by the specified signature. Args: tx_sig (str): Transaction signature to confirm commitment (Optional[str]): Bank state to query ("finalized", "confirmed" or "processed") Returns: str: Transaction confirmation status """ async with AsyncClient(rpc_url) as client: result = await client.confirm_transaction( Signature.from_string(tx_sig), Commitment(commitment) if commitment else None, ) return f"Transaction confirmation: {result}"

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/tywenk/mcp-sol'

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