Skip to main content
Glama

Price a side bet

quote_bet
Read-onlyIdempotent

Use this to price a side bet before you make it (POST /api/competitions//market/quote: writes nothing). outcome_id (get_market's outcomes: an entry's label is its entrant's '@handle' and entry.name the entry's own name, and the bet is on what the market's follows says, that one entry or its entrant; FIELD, 1, is never traded), side yes or no, action buy or sell, and exactly one of usdc_base_units (a buy: what to spend, fee included, the most shares it buys; a sell: what to raise, the fewest shares that raise it) or shares_base_units (1,000,000 is one share, which pays 1 USDC if its side wins). Answers shares_base_units; delta, the program's signed change on the outcome (+ for a YES buy or a NO sell, - for a YES sell or a NO buy); cash_base_units (the market maker's, before the fee); fee_base_units; total_base_units (what a buy pays or a sell takes, fee included); avg_price_ppm and cents; price_before_ppm, price_after_ppm and cents (the side's); to_win_base_units (what a buy's shares pay if the side wins; null on a sell); and limit_base_units, the suggested limit 1% off the quote (a buy's most paid, a sell's least taken). Prices move with every trade, so a quote holds nothing: prepare_bet quotes again for you when it is given an amount in USDC or no limit. A sell is priced as the program prices it, on the book as it stands: the book already counts every share any wallet holds, the seller's among them, so a quote to sell shares is what selling them returns now, whoever holds them, and never what buying them and selling them back would return (a buy moves its side's price up first; its sale gives back about what it cost, less both fees). A buy is priced only inside a betting window; a sell inside one, and outside every window while get_market's sells_now holds (until sells_until). A refusal is the route's RFC 9457 problem whole: not_tradeable (FIELD), outcome_scratched (a scratched entry takes no trade, a sell included: it cannot win, so its YES shares pay nothing and its NO shares pay 1 USDC each when the market settles; and a buy of an entry being scratched: one rejected, withdrawn or replaced that the market no longer lists, before its scratch lands on chain, where a sell still lands), not_trading (halted, proposed or resolved, a buy on a market being halted or closed to buying because its competition was withdrawn or its result is public, a buy, from anyone, on a bounty make.fun took off the site (" was taken off the site by make.fun, so its side market takes no new bets: a sell still lands while sells are open."), or a sell once sells closed: the detail says why), outside_window (a buy with no window open: the detail names the next window), bad_amount (not exactly one amount, or not a positive whole number), too_small, crosses_zero (a trade may not flip a position from YES to NO or back: sell first, then buy the other side), insufficient_shares. Next: prepare_bet with the quote's shares_base_units and its limit_base_units, or a limit of your own.

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": {
      "slug": "<slug>",
      "outcome_id": "<outcome_id>",
      "side": "<side>",
      "action": "<action>"
    },
    "name": "quote_bet"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYesyes (pays 1 USDC a share if the entry wins) or no (pays 1 USDC a share if it does not)
slugYesThe competition slug, e.g. chess-engine-01 (list_competitions lists them)
actionYesbuy (the position grows) or sell (it shrinks)
outcome_idYesThe outcome: get_market's outcomes[].outcome_id (0 NONE, no entry wins: on a market whose house is listed, nobody finishes first, no house entry either; each listed entry, or entrant where the market follows the entrant, from 2, with each listed house entry there (entry.house true); FIELD, 1, is never traded)
usdc_base_unitsNoA buy: what to spend, fee included; a sell: what to raise. 1000000 is 1 USDC
shares_base_unitsNoThe shares to buy or sell: 1000000 is one share

Output Schema

NameRequiredDescriptionDefault
sideYes
deltaYes
actionYes
outcome_idYes
avg_price_ppmYes
fee_base_unitsYes
avg_price_centsYes
cash_base_unitsYes
price_after_ppmYes
limit_base_unitsYes
price_before_ppmYes
total_base_unitsYes
price_after_centsYes
shares_base_unitsYes
to_win_base_unitsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / outcome_id / description
      Previous value: -"The outcome: get_market's outcomes[].outcome_id (0 NONE, no entry wins; each listed entry, or entrant where the market follows the entrant, from 2; FIELD, 1, is never traded)"New value: +"The outcome: get_market's outcomes[].outcome_id (0 NONE, no entry wins: on a market whose house is listed, nobody finishes first, no house entry either; each listed entry, or entrant where the market follows the entrant, from 2, with each listed house entry there (entry.house true); FIELD, 1, is never traded)"
  2. Changed1 schema field changed
    • changedInput schema / properties / outcome_id / description
      Previous value: -"The outcome: get_market's outcomes[].outcome_id (0 NONE, no entry wins; each listed entry from 2; FIELD, 1, is never traded)"New value: +"The outcome: get_market's outcomes[].outcome_id (0 NONE, no entry wins; each listed entry, or entrant where the market follows the entrant, from 2; FIELD, 1, is never traded)"
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish readOnlyHint, idempotentHint, and destructiveHint=false, but the description adds substantial context: the quote writes nothing, holds nothing, and prices move with every trade. It also documents the pricing behavior for buys and sells and enumerates the meaning of refusal cases such as not_tradeable, outcome_scratched, not_trading, outside_window, bad_amount, too_small, crosses_zero, and insufficient_shares.

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

Conciseness2/5

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

The purpose is front-loaded, but the description is an unusually long, semicolon-heavy run-on that is difficult to parse. It also explains many return fields in detail despite having an output schema, and the refusal-code enumeration is dense enough that the reader must work to extract actionable guidance.

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?

Given the complexity of market pricing, buy/sell asymmetry, window gating, and multiple refusal modes, the description is highly complete. It covers edge cases such as scratched entries, halted markets, sells outside windows, position-flip restrictions, and the suggested limit, leaving little an agent needs to infer before calling it correctly.

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 structured fields already carry substantial documentation, but the description adds a critical constraint not expressed in the schema: exactly one of usdc_base_units or shares_base_units must be supplied. It also clarifies the buy/sell meaning of each amount field and the economic meaning of shares, which goes beyond the schema descriptions.

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 and resource: 'Use this to price a side bet before you make it,' and immediately identifies the route and that it writes nothing. It also distinguishes this quoting step from prepare_bet, so an agent can separate it from the next action.

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

Usage Guidelines5/5

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

It explicitly says to use this before making a bet and then directs the agent to prepare_bet with the quote's shares_base_units and limit_base_units, or a custom limit. It also states the conditions under which buys and sells can be quoted, including betting windows and sells_now, which gives clear when-to-use 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.