Skip to main content
Glama

cast_send

Send a state-changing transaction to a deployed smart contract with configurable signing, gas, value, and function arguments.

Instructions

Send a state-changing transaction to a deployed contract (cast send).

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": {
      "to": "<to>",
      "rpcUrl": "<rpcUrl>"
    },
    "name": "cast_send"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesAddress of the contract to send the transaction to
awsNoSign with AWS KMS (requires AWS_KMS_KEY_ID env var)
gcpNoSign with Google Cloud KMS (requires GCP_PROJECT_ID, GCP_LOCATION, GCP_KEY_RING, GCP_KEY_NAME, GCP_KEY_VERSION env vars)
argsNoFunction arguments in order
fromNoSender address, used with --unlocked or hardware wallets. Maps to --from for cast/deploy, --sender for forge script.
valueNoETH value to send (in wei, or use 'cast to-wei' first)
ledgerNoSign with a Ledger hardware wallet
rpcUrlYesRPC URL of the network
trezorNoSign with a Trezor hardware wallet
accountNoNamed keystore account from ~/.foundry/keystores (recommended for production). Create one with: cast wallet import <name> --interactive
gasLimitNoGas limit override
keystoreNoPath to an encrypted keystore JSON file
unlockedNoUse eth_sendTransaction with --from address (no local signing). For nodes that manage keys natively.
signatureNoFunction signature, e.g. "transfer(address,uint256)"
privateKeyNoRaw private key for signing. Only use for local development with well-known test keys (e.g. anvil accounts). For production, use 'account' (named keystore) or hardware wallets instead.
passwordFileNoPath to a file containing the keystore password
keystorePasswordNoKeystore password (prefer passwordFile to keep it out of process args)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it discloses nothing beyond the basic action: no statement that the transaction is irreversible, that gas will be spent, that a signing method must be chosen among the many offered, or what the tool returns (e.g. a tx hash). For a 17-parameter write operation this is a substantial gap.

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?

A single short sentence, front-loaded with the action and the resource, with zero redundant wording. Its brevity is efficient, though it shades into under-specification rather than disciplined concision.

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?

For a high-stakes mutation tool with 17 parameters, no annotations, and no output schema, the definition says almost nothing about signing requirements, irreversibility, or expected results. The rich schema compensates for parameter detail but not for behavioral context an agent needs before committing a transaction.

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%, and the schema already explains every parameter including signing backends, value units, and keystore guidance. The description adds no meaning beyond that, so the baseline of 3 applies.

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 gives a specific verb ('Send') plus resource ('state-changing transaction to a deployed contract'), and the qualifier 'state-changing' usefully separates it from read-only siblings like cast_call. It stops short of naming any sibling outright, so the differentiation is implied rather than explicit.

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?

There is no explicit when-to-use guidance, no mention of prerequisites (funded account, RPC availability, signing mode selection), and no pointer to alternatives such as cast_call for reads or cast_tx for lookups. The only usage signal is the phrase 'state-changing', which a reader must interpret on their own.

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