Skip to main content
Glama

sendSignedTransaction

Submit signed Ethereum transactions to blockchain networks to execute operations and receive confirmation receipts.

Instructions

Send a signed transaction to the blockchain network. Returns transaction hash and receipt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signedTransactionYesThe signed transaction data as hex string
providerNoOptional. Either a network name or custom RPC URL. Use getAllNetworks to see available networks and their details, or getNetwork to get info about a specific network. You can use any network name returned by these tools as a provider value.
chainIdNoOptional. The chain ID to use.

Implementation Reference

  • Registration, schema, and handler for the 'sendSignedTransaction' MCP tool. The handler validates input, calls ethersService.sendSignedTransaction, formats the response with tx hash and receipt details, or handles errors.
      server.tool(
        "sendSignedTransaction",
        "Send a signed transaction to the blockchain network. Returns transaction hash and receipt.",
        {
          signedTransaction: z.string().regex(/^0x[a-fA-F0-9]*$/).describe(
            "The signed transaction data as hex string"
          ),
          provider: z.string().optional().describe(PROVIDER_DESCRIPTION),
          chainId: z.number().optional().describe(
            "Optional. The chain ID to use."
          )
        },
        async ({ signedTransaction, provider, chainId }) => {
          try {
            const result = await ethersService.sendSignedTransaction(
              signedTransaction,
              provider,
              chainId
            );
            
            let responseText = `Transaction Sent Successfully:
    
    Transaction Hash: ${result.hash}`;
            
            if (result.receipt) {
              responseText += `
    Transaction Receipt:
    - Block Number: ${result.receipt.blockNumber}
    - Block Hash: ${result.receipt.blockHash}
    - Gas Used: ${result.receipt.gasUsed.toString()}
    - Status: ${result.receipt.status === 1 ? 'Success' : 'Failed'}`;
            } else {
              responseText += `
    Transaction Status: Pending (receipt not yet available)`;
            }
            
            return {
              content: [{ 
                type: "text", 
                text: responseText
              }]
            };
          } catch (error) {
            return {
              isError: true,
              content: [{ 
                type: "text", 
                text: `Error sending signed transaction: ${error instanceof Error ? error.message : String(error)}`
              }]
            };
          }
        }
      );
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the action ('send') and return values, but lacks critical behavioral details such as whether this is a write operation (implied but not stated), potential for failure (e.g., network errors, insufficient gas), side effects (e.g., on-chain state changes), or security considerations (e.g., irreversible once confirmed). This is a significant gap for a blockchain transaction tool.

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 two sentences with zero waste: the first states the purpose and action, the second specifies the return values. It's front-loaded with the core functionality and appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given the complexity of blockchain transactions (write operations with irreversible effects), no annotations, and no output schema, the description is incomplete. It covers the basic purpose and returns but misses critical context like error handling, confirmation requirements, or cost implications. It's adequate as a minimum but has clear gaps for safe usage.

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%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain format details for 'signedTransaction' or usage trade-offs for 'provider' vs 'chainId'). Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the specific action ('send a signed transaction') and resource ('to the blockchain network'), and distinguishes it from sibling tools like 'sendTransaction' (which likely sends unsigned transactions) and 'sendTransactionWithOptions' (which likely provides more configuration). It also specifies the return values ('transaction hash and receipt').

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

Usage Guidelines4/5

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

The description implies usage context by specifying it's for sending signed transactions, distinguishing it from tools like 'prepareTransaction' or 'sendTransaction'. However, it doesn't explicitly state when NOT to use this tool or name alternatives, such as using 'sendTransaction' for unsigned transactions or 'sendTransactionWithOptions' for more control.

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/crazyrabbitLTC/mcp-ethers-server'

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