Skip to main content
Glama

eth_sendRawTransaction

Execute signed Ethereum transactions or deploy smart contracts by submitting pre-signed transaction data to any EVM-compatible blockchain network.

Instructions

Creates new message call transaction or a contract creation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signedTransactionDataYesSigned transaction data (hex string)

Implementation Reference

  • The handler function executes the eth_sendRawTransaction by calling the generic makeRPCCall helper with the provided signed transaction data and formats the transaction hash response or error.
    async ({ signedTransactionData }) => {
      try {
        const result = await makeRPCCall("eth_sendRawTransaction", [
          signedTransactionData,
        ]);
    
        return {
          content: [
            {
              type: "text",
              text: formatResponse(
                {
                  transaction_hash: result,
                  status: "Transaction submitted successfully",
                },
                "Raw Transaction Sent",
              ),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: "text",
              text: `Error: ${error.message}`,
            },
          ],
        };
      }
    },
  • Zod input schema defining the signedTransactionData parameter as a hex string.
    {
      signedTransactionData: z
        .string()
        .describe("Signed transaction data (hex string)"),
    },
  • src/index.ts:547-586 (registration)
    Registration of the eth_sendRawTransaction tool with server.tool, including name, description, schema, and handler reference.
    server.tool(
      "eth_sendRawTransaction",
      "Creates new message call transaction or a contract creation",
      {
        signedTransactionData: z
          .string()
          .describe("Signed transaction data (hex string)"),
      },
      async ({ signedTransactionData }) => {
        try {
          const result = await makeRPCCall("eth_sendRawTransaction", [
            signedTransactionData,
          ]);
    
          return {
            content: [
              {
                type: "text",
                text: formatResponse(
                  {
                    transaction_hash: result,
                    status: "Transaction submitted successfully",
                  },
                  "Raw Transaction Sent",
                ),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [
              {
                type: "text",
                text: `Error: ${error.message}`,
              },
            ],
          };
        }
      },
    );
  • Generic RPC call helper function used by the handler to send the eth_sendRawTransaction RPC method to the Ethereum provider.
    async function makeRPCCall(method: string, params: any[] = []): Promise<any> {
      try {
        const result = await provider.send(method, params);
        return result;
      } catch (error: any) {
        throw new Error(`RPC call failed: ${error.message}`);
      }
    }
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 tool creates transactions, implying a write operation, but lacks critical details: it doesn't specify that this is a destructive/mutative action, mention authentication needs, rate limits, network effects, or error handling. This is inadequate for a tool that likely modifies blockchain state.

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 extremely concise—a single, front-loaded sentence that directly states the tool's function without any fluff or redundancy. Every word earns its place, making it efficient for quick understanding.

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 tool's complexity (a transaction creation tool in Ethereum, which is inherently mutative and high-stakes), the description is incomplete. With no annotations and no output schema, it fails to address key aspects like behavioral traits (e.g., irreversibility, gas costs), error responses, or return values, leaving significant gaps for an AI agent.

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?

The description adds no parameter-specific information beyond what the input schema provides. Since schema description coverage is 100% (the single parameter 'signedTransactionData' is well-documented in the schema), the baseline score of 3 applies, as the schema already covers the parameter meaning adequately.

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 tool's purpose with specific verbs ('creates new message call transaction or a contract creation'), distinguishing it from read-only siblings like eth_getBalance or eth_call. However, it doesn't explicitly differentiate from other transaction-related tools like eth_estimateGas, which is why it doesn't reach 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 signed transaction data), exclusions, or compare it to siblings like eth_estimateGas for gas estimation or eth_call for simulation, leaving the agent with no contextual usage cues.

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/JamesANZ/evm-mcp'

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