Skip to main content
Glama

Build a trade from a forecast

build_order
Read-only

Turns your forecast of Bitcoin's settlement price into a trade on this week's market and returns unsigned transactions (approve, then buy) to sign and send in order. Give EITHER quantiles (easiest) OR probs. It buys more where you're more confident than the crowd. Budget is in tUSDC including the fee, 1 to 10000.

Input Schema

NameRequiredDescriptionDefault
probsNoAlternative: one probability per price range from get_market, in index order. Normalized for you.
budgetYestUSDC to spend, fee included. maxCost adds your slippage allowance on top
walletNoYour wallet, to check balance and skip the approval if it's already granted
quantilesNoYour forecast as BTC prices in USD at the 5th, 10th, 25th, 50th, 75th, 90th and 95th percentiles, e.g. [76000, 77500, 79500, 81000, 82500, 84500, 86000]
slippageBpsNoPrice-move allowance in basis points, default 100

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / budget / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "string"
      +]
    • removedInput schema / properties / probs / items / minimum
      Removed value: -0
    • changedInput schema / properties / probs / items / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "string"
      +]
    • removedInput schema / properties / quantiles / items / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / quantiles / items / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "string"
      +]
  2. Changed1 schema field changed
    • removedInput schema / properties / quantiles / minItems
      Removed value: -7
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint and openWorldHint, so the bar is lower. The description adds substantial context beyond them: it returns unsigned transactions in a specific order (approve, then buy), buys more where the forecast is more confident than the crowd, and states the budget range and fee inclusion.

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?

The description is front-loaded with the core action and return behavior, then moves cleanly through input alternatives, sizing logic, and budget constraints. Every sentence carries useful information and there is no filler.

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 complex trade-construction tool with five parameters and no output schema, the description covers what is returned (unsigned approve and buy transactions to sign and send in order), input alternatives, and budget semantics. It leaves some minor gaps around return value structure and prerequisites, but it is largely sufficient for correct invocation.

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. The description still adds value by making the either/or choice between quantiles and probs explicit, labeling quantiles as easiest, and specifying that budget is in tUSDC including the fee and must be between 1 and 10000, details not present in the schema for budget.

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 states a specific verb and resource: it turns a BTC settlement-price forecast into a trade and returns unsigned approve/buy transactions. This is clearly distinct from the sibling reader/faucet tools, and an agent knows exactly what the tool produces without opening the schema.

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

Usage Guidelines3/5

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

It gives clear input guidance (use EITHER quantiles OR probs, with quantiles easiest) and context that the trade is on this week's market. However, it does not explicitly say when to use this tool versus alternatives or that get_market must be called first to obtain the price ranges needed for probs.

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