Skip to main content
Glama

Vectorial Data Terminal: Hyperliquid, Polymarket & yield for AI agents

place_prediction_order

Buy or sell a prediction outcome with a fill-or-kill market order (fills entirely at a protected price or nothing happens). BUY: amount_usd (min $1; Polymarket's taker fee and our builder fee go on top — the same everyone pays; max_spend_usd caps the all-in spend). SELL: shares. Optional limit_price (BUY: max, SELL: min) — the house price guard still applies, the stricter wins. Returns typed_data: sign it with your AGENT wallet (EIP-712), then submit_prediction_order within 60s. Your caps (order size, account exposure, daily loss) count perps and predictions together; sells only reduce and skip them.

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_id": "<token_id>",
      "side": "<side>"
    },
    "name": "place_prediction_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYesbuy = buy shares of this outcome; sell = sell shares you hold
sharesNoSELL only: how many shares to sell
token_idYesThe outcome's CLOB token id (decimal string) from list_prediction_markets
amount_usdNoBUY only: USD to spend (min $1; fees go on top)
limit_priceNoOptional worst price as a probability 0–1 (buy: max, sell: min); it can only tighten the house guard
max_spend_usdNoBUY only: cap on the all-in spend, fees included
client_order_idNoYour own id for this order (up to 64 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / amount_usd / description
      Added value: +"BUY only: USD to spend (min $1; fees go on top)"
    • addedInput schema / properties / client_order_id / description
      Added value: +"Your own id for this order (up to 64 characters)"
    • addedInput schema / properties / limit_price / description
      Added value: +"Optional worst price as a probability 0–1 (buy: max, sell: min); it can only tighten the house guard"
    • addedInput schema / properties / max_spend_usd / description
      Added value: +"BUY only: cap on the all-in spend, fees included"
    • addedInput schema / properties / shares / description
      Added value: +"SELL only: how many shares to sell"
    • addedInput schema / properties / side / description
      Added value: +"buy = buy shares of this outcome; sell = sell shares you hold"
    • addedInput schema / properties / token_id / description
      Added value: +"The outcome's CLOB token id (decimal string) from list_prediction_markets"
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the generic safety profile (not read-only, not idempotent, open-world, non-destructive). The description goes well beyond: fill-or-kill execution, fee stacking, the house price guard interaction, the EIP-712 signing requirement with the agent wallet, and the 60-second submission window. It also discloses that risk caps aggregate perps and predictions.

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?

Front-loaded with the core action and execution semantics, then side-specific parameters, then the required next step. Dense but every clause carries information; the heavy parenthetical nesting makes it slightly harder to scan than it could be.

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?

No output schema exists, yet the description explains what is returned (typed_data to sign) and what to do with it, plus the time limit. For a 7-parameter mutation tool with an external signing step, nothing an agent needs to call it correctly 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 already 100%, but the description adds real meaning beyond it: fees sit on top of amount_usd, max_spend_usd is an all-in cap including fees, and limit_price can only tighten the house guard ('the stricter wins'). It also notes sells only reduce exposure and skip caps, which the schema does not convey.

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 ('Buy or sell a prediction outcome') plus the order type (fill-or-kill market order) and its defining behavior (fills entirely at a protected price or nothing). This clearly separates it from submit_prediction_order, which is named as the downstream step.

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 explicit per-side guidance: BUY uses amount_usd with max_spend_usd, SELL uses shares, and limit_price is optional with side-dependent meaning. It also states the required follow-up (sign typed_data, then submit_prediction_order within 60s). It does not explicitly contrast with the perps-side place_order/submit_order siblings, which is the only gap.

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.