Skip to main content
Glama

sign_transaction

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.

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.

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. 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+$"
  2. First observedv1.7.3

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations the description carries the full burden and does so well: it discloses per-chain return formats (raw hex for EVM, base64 for Solana), the non-broadcast side effect, and the non-obvious policy consequence that a signed tx is treated as a spend (checked, reserved on the ledger, counted against budgets). The spend-policy disclosure is exactly the kind of hidden behavior an agent must know before calling.

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?

Four sentences, front-loaded with the core action and return behavior, followed by the crucial exclusions. Every sentence carries distinct, non-redundant information; nothing restates the name or schema.

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-parameter, no-annotation, no-output-schema tool, the description supplies the missing behavioral and return-value context (both chain formats, non-broadcasting, spend-policy accounting) that annotations and schema do not cover. Nothing an agent needs in order to call it correctly is absent.

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 10 parameters with per-chain notes (EVM-only fields, Solana-only token_mint/token_decimals, value units). The description adds no parameter-level detail beyond the schema, which makes the baseline 3 appropriate.

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 first sentence states a specific verb+resource ('Sign a transaction with a wallet's private key') and the rest differentiates it from the closest sibling by explaining exactly what it returns versus what send_transaction does. An agent can route between sign_transaction and send_transaction without opening either schema.

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?

Explicit exclusions and alternatives are given: 'Does NOT broadcast' and 'Use send_transaction for sign + broadcast.' This is the exact when-to-use/when-not split an agent needs, stated with no inference required.

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