Skip to main content
Glama

sign_transaction

Signs EVM or Solana transactions with a wallet's private key and returns the signed payload without broadcasting; use when you need a signed transaction to submit elsewhere.

Instructions

Sign a transaction with a wallet's private key. For EVM: returns signed raw transaction hex. For Solana: returns base64 signed transaction. Does NOT broadcast. Use send_transaction for sign + broadcast. A signed transaction is a spend: under a spend policy it is checked, reserved on the ledger and counted against the budgets exactly as send_transaction is, because the caller can broadcast it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "wallet_id": "<wallet_id>",
      "to": "<to>"
    },
    "name": "sign_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesDestination address (0x-prefixed for EVM, Base58 for Solana)
dataNoHex-encoded calldata (0x-prefixed) for EVM contract calls
valueNoValue in wei/lamports (decimal integer string; no hex, no decimals)0
max_feeNoMax fee per gas in wei — EVM only (auto if omitted)
chain_idNoChain ID (defaults to wallet's default)
gas_limitNoGas limit — EVM only (auto-estimated if omitted)
wallet_idYesWallet ID
token_mintNoSPL token mint address — Solana only (for SPL token transfers)
priority_feeNoMax priority fee per gas in wei — EVM only (auto if omitted)
token_decimalsNoSPL token decimals, Solana only (6 for USDC)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.14.8
    • addedInput schema / properties / chain_id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / chain_id / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / wallet_id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / wallet_id / minimum
      Added value: +-9007199254740991
  2. Changed7 schema fields changedv1.14.2
    • addedInput schema / properties / data / pattern
      Added value: +"^(0x([0-9a-fA-F]{2})*)?$"
    • addedInput schema / properties / to / pattern
      Added value: +"^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$"
    • changedInput schema / properties / token_decimals / description
      Previous value: -"SPL token decimals — Solana only (6 for USDC)"New value: +"SPL token decimals, Solana only (6 for USDC)"
    • addedInput schema / properties / token_decimals / maximum
      Added value: +36
    • addedInput schema / properties / token_decimals / minimum
      Added value: +0
    • changedInput schema / properties / value / description
      Previous value: -"Value in wei/lamports (decimal string)"New value: +"Value in wei/lamports (decimal integer string; no hex, no decimals)"
    • addedInput schema / properties / value / pattern
      Added value: +"^\\d+$"
  3. First observedv1.7.3

TDQS

A4.6/5.0
Behavior5/5

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

No annotations, so the description carries the full burden and does so well: it discloses that it does NOT broadcast, that signed transactions are treated as spends (checked, reserved, counted against budgets) exactly like send_transaction, and why (caller can broadcast). That is exactly the non-obvious behavioral context an agent needs before signing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action, then chain-specific returns, then the no-broadcast constraint, then the spend implication. Five sentences, each earning its place, though the final sentence is denser than it needs to be.

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

Completeness5/5

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

For a 10-param signing tool with no annotations and no output schema, the description covers the critical unknowns: output format per chain, no broadcast, and spend-accounting consequences. Schema already handles per-param detail, so nothing an agent needs to call it correctly is missing.

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 coverage is 100%, so each of the 10 parameters is already documented with types, patterns, defaults, and chain applicability. The description adds nothing parameter-specific (e.g., how value/data interact with token_mint), so the baseline 3 applies.

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?

Specific verb+resource (sign a transaction with a wallet's private key) plus chain-specific return formats (raw hex for EVM, base64 for Solana). It explicitly contrasts with send_transaction, so an agent can distinguish it from the sibling without opening schemas.

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

Usage Guidelines5/5

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

States clearly when to use it (sign only, no broadcast) and names the alternative (send_transaction for sign + broadcast), plus flags the spend-policy implication. Explicit when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.