Skip to main content
Glama

Build trade

build_trade
Read-onlyIdempotent

Build unsigned transactions to buy a stock token on Robinhood Chain with ETH (eth, or usd worth of ETH) or sell pct percent of the wallet’s holding for ETH. token is a ticker (TSLA) or the token address. A buy needs the ETH, plus gas, already in wallet; if it is short, fund it with fund_agent first. The calls expire at valid_until: sign and send before then, or build the trade again. Returns calls for the wallet owner to sign and send in order on Robinhood Chain (chain ID 4663). No keyfo tool signs. The answer also has sign_url: a keyfo page where the user checks the transaction and signs it in their own wallet. It stays open for 15 minutes and gets a new quote itself when the price is out of date. Show that link to the user, and never ask them to paste the transaction data anywhere.

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": {
      "token": "<token>",
      "side": "<side>",
      "wallet": "<wallet>"
    },
    "name": "build_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
ethNoETH to spend on a buy, up to 10.
pctNoShare of the holding to sell, above 0 and up to 100.
usdNoDollars of ETH to spend, at the current ETH price.
sideYesbuy or sell.
tokenYesTicker, like TSLA, or the token address.
walletYesThe wallet that signs and sends. The route is quoted for it.
slippage_pctNoPrice tolerance in percent: 1 by default, from 0.1 to 10.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses that calls expire at valid_until, that the returned calls must be signed and sent in order, that the sign_url page stays open 15 minutes and re-quotes itself when the price is stale, and an explicit instruction never to ask the user to paste transaction data. This is exactly the behavioral 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.

Conciseness4/5

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

Purpose and funding prerequisite are front-loaded, and most sentences carry distinct information. There is some overlap between 'Returns calls for the wallet owner to sign and send in order' and the following sign_url sentence, but the density is justified for a multi-step signing workflow.

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?

With 7 parameters and no output schema, the description still covers the return shape (calls plus sign_url), ordering, expiry, and the user-facing signing instruction. Nothing an agent needs in order to call this correctly and relay the result is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: `token` is a ticker or address, `eth`/`usd` are both ways of spending ETH on a buy, and `pct` is a share of the existing holding on a sell. `slippage_pct` is left entirely to the schema, which is the only shortfall.

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?

States a specific verb and resource ('Build unsigned transactions to buy a stock token ... or sell pct percent of the wallet's holding'), names the chain and chain ID, and makes clear the output is unsigned calls for the owner to sign. An agent can tell this apart from signing tools ('No keyfo tool signs') and from the funding sibling it references.

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?

Gives concrete preconditions and a routing rule: a buy requires ETH plus gas already in `wallet`, and if short, use fund_agent first. It also sets the timing rule for valid_until and the sign_url page. It stops short of explicitly excluding the other trade-building siblings, but the conditional guidance it does give is clear and actionable.

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