Skip to main content
Glama

Build a transaction

build_transaction
Read-onlyIdempotent

Builds the transactions for one action, ready for from’s own wallet to sign and send in order on Robinhood Chain: buy or sell (amount, optional slippage_bps, accept_impact and market: by default the trade goes to the market that gives more, the Civic Pool through CivicRouter with a ten-minute deadline, or Semiosis’s Pons launch curve directly, where the minimum out is the only limit, validUntil is null and the to is the curve that get_contracts lists under outside; market civic keeps it on CivicRouter; a sale approves exactly its amount), stake or unstake (amount), claim_pass, borrow (amount of Semiosis to lock), repay or extend (loan_id), delegate (to, or itself when left out), vote (proposal_id, support), and the public duties sweep_pool_fees, pay_stakers and close_expired_loan (loan_id). amount may be "max". Nothing is signed or sent here. A lone transaction is first run as an eth_call from from, and one that would fail is refused with the reason; an approval is added only when the allowance falls short.

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": {
      "action": "<action>",
      "from": "<from>"
    },
    "name": "build_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoWho votes with this stake (delegate); `from` itself when left out.
fromYesThe address that will sign and send the transactions.
actionYes
amountNoIn whole units as a decimal string, or "max": ETH for buy; Semiosis for sell, stake, unstake and borrow.
marketNoWhere to trade. auto (the default) quotes the Civic Pool and Semiosis’s Pons launch curve at the same block and uses the one that gives more; the Civic Pool keeps a near tie (within 0.5%), since its fee goes to the treasury, and a buy that would close the curve is never sent to it (the quote gives markets.pons.maxBuyEth). civic or pons uses that market; civic keeps every trade on the CivicRouter, with its deadline. (buy and sell)
loan_idNoA loan’s id as a string, such as "3" (repay, extend, close_expired_loan).
supportNoHow to vote (vote).
proposal_idNoA proposal’s id as get_proposals gives it (vote).
slippage_bpsNoSlippage in basis points, 1 to 500 (100 = 1%). Default 100.
accept_impactNoAccept a trade that loses 15% or more of its value to price impact (buy and sell).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (which already declare read-only, idempotent and non-destructive), the description discloses substantial behavior: a lone transaction is simulated via eth_call from `from` and refused with the failure reason, an approval is inserted only when the allowance falls short, and a sale approves exactly its amount. Market selection is also spelled out, including the near-tie rule favoring the Civic Pool and the guard that never routes a curve-closing buy to it. This is exactly the extra context annotations cannot carry.

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

Conciseness3/5

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

The purpose is front-loaded in the opening clause, which is good, but the rest is a single run-on sentence of roughly 200 words with deeply nested parentheses enumerating every action. The content mostly earns its place, yet the density and one-sentence structure make it hard to parse and would benefit from breaking the action list and the market rules into separate sentences.

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

Completeness4/5

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

For a 10-parameter, no-output-schema tool, the description covers action coverage, market defaults, validation and approval behavior thoroughly. The remaining gap is that it never says what the call returns (a list of transaction objects with to/data/value and how many), which an agent needs since no output schema exists.

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 90%, so the schema already documents most parameters, and the description largely restates it (amount may be "max", market default is auto, delegate defaults to `from`). It adds a little behavioral meaning around approvals and market tie-breaking but no syntax or format detail beyond the schema; baseline 3 applies 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 opens with a specific verb+resource: it builds unsigned transactions for one action, ready for `from`'s wallet to sign and send. It enumerates every supported action (buy/sell, stake/unstake, claim_pass, borrow, repay/extend, delegate, vote, and the public duty sweeps), so an agent can map an intent to this tool without inspecting the enum. It also states clearly that signing and sending happen elsewhere, distinguishing it from a send/submit tool.

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?

It makes the usage context explicit: this is the pre-signing step, nothing is signed or sent here, and the transaction is dry-run as an eth_call first and refused if it would fail. It does not, however, explicitly route the agent to a sibling such as quote or get_state before calling (quote is only referenced indirectly via markets.pons.maxBuyEth), so there is no explicit when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources