Skip to main content
Glama

check_constraint_live

Read-only

Fetch live quotes and fees to check whether related prediction-market contracts violate a chosen relation, returning price bounds, net edge after fees, and the best no-arbitrage basket.

Instructions

Fetch live quotes and fees, then calculate price bounds conditional on the supplied relation.

This is the main research call: find related contracts with search_markets,
confirm with get_market that their resolution rules really satisfy the
relation, then pass them here. Read-only: it calls the venues' public APIs
and places no orders. Returns the check_constraint result (violated,
profitable_after_fees, best basket with net edge) plus the quotes it used;
to simulate the trade, call paper_order for each leg of the best basket.
Live quotes do not verify resolution rules, order-book depth or full fills:
assessment.relation_verified and assessment.execution_verified remain false.

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": {
      "relation": "<relation>",
      "markets": "<markets>"
    },
    "name": "check_constraint_live"
  }
}

Input Schema

NameRequiredDescriptionDefault
makerNoPrice fees as resting maker orders instead of taker orders (default false). Maker fees are lower or zero, but a resting order may not fill.
marketsYesMarkets to check, each {venue, market_id}, in the order the relation expects: two for implication (A then B), complement and same_event; every outcome for exclusivity and event_sum. Venues may be mixed.
relationYesBound to test: implication (A implies B, so P(A) <= P(B)), exclusivity (at most one outcome happens), complement (exactly one of two), same_event (one event quoted on two venues) or event_sum (exactly one of n). See list_relation_types.
contractsNoFinite, positive contracts bought on every leg (default 1). Fees scale with size.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.0
    • changedInput schema / properties / contracts / description
      Previous value: -"Contracts bought on every leg (default 1). Fees scale with size."New value: +"Finite, positive contracts bought on every leg (default 1). Fees scale with size."
  2. Changed7 schema fields changedv1.2.2
    • addedInput schema / $defs / MarketRef / description
      Added value: +"A live market to check, identified by venue and market id."
    • addedInput schema / $defs / MarketRef / properties / market_id / description
      Added value: +"Kalshi ticker or Polymarket market id, as returned by search_markets."
    • addedInput schema / $defs / MarketRef / properties / venue / description
      Added value: +"'kalshi' or 'polymarket'."
    • addedInput schema / properties / contracts / description
      Added value: +"Contracts bought on every leg (default 1). Fees scale with size."
    • addedInput schema / properties / maker / description
      Added value: +"Price fees as resting maker orders instead of taker orders (default false). Maker fees are lower or zero, but a resting order may not fill."
    • addedInput schema / properties / markets / description
      Added value: +"Markets to check, each {venue, market_id}, in the order the relation expects: two for implication (A then B), complement and same_event; every outcome for exclusivity and event_sum. Venues may be mixed."
    • addedInput schema / properties / relation / description
      Added value: +"Bound to test: implication (A implies B, so P(A) <= P(B)), exclusivity (at most one outcome happens), complement (exactly one of two), same_event (one event quoted on two venues) or event_sum (exactly one of n). See list_relation_types."
  3. First observedv1.2.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds important behavior: it calls public venue APIs, places no orders, and returns quotes plus the constraint result. Crucially, it discloses limitations: live quotes do not verify resolution rules, order-book depth, or full fills, and assessment.relation_verified and assessment.execution_verified remain false.

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?

The description is front-loaded with purpose and workflow, then caveats. It is somewhat long, but every sentence contributes operational guidance or important limitation context.

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 an output schema present and annotations covering safety, the description still fills critical gaps: workflow, return shape, simulation handoff, and false verification flags. An agent has enough context to select and invoke the tool correctly.

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 description coverage is 100%, including detailed relation, markets ordering, maker, and contracts semantics. The description adds workflow context but does not expand parameter meaning beyond what the schema already provides. The baseline of 3 is appropriate when the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 pair: fetch live quotes and fees, then calculate price bounds conditional on a relation. It clearly frames this as the live-quote research call and names the downstream/upstream siblings search_markets and get_market. It does not explicitly contrast itself with the sibling check_constraint, which is the only real gap.

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 gives explicit usage guidance: this is the main research call, use search_markets to find related contracts, confirm resolution rules with get_market, then pass them here. It also routes simulation to paper_order for each leg of the best basket. Alternatives and sequencing are clear.

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