Skip to main content
Glama

paper_order

Simulate buying YES or NO contracts against the live order book with venue fees in a local ledger, never sending orders to a venue. Test basket legs and retry safely with request IDs.

Instructions

Simulate buying YES or NO contracts in the local paper ledger, filling against the live order book with venue fees. Never sends an order to a venue.

Walks the displayed asks from the best price up to limit_price and charges
the venue fee on each level. Use it to test the legs of a basket found by
check_constraint_live. Writes ~/.oracle3/mcp_paper_ledger.json (or the path
in ORACLE3_MCP_LEDGER); only buys are supported and positions are held at
cost. Returns status (filled, partially_filled, unfilled, or rejected when
paper cash is short), requested and filled contracts, average price, cost,
fees and the per-level fills. Supply request_id for safe retries: an identical
venue/market/side/quantity/limit returns the original result without another
fill, including unfilled or rejected results; changed intent is an error.
Without request_id, each call is a new order. Reset clears retry history.

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": {
      "venue": "<venue>",
      "market_id": "<market_id>",
      "side": "<side>",
      "contracts": "<contracts>",
      "limit_price": "<limit_price>"
    },
    "name": "paper_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYesSide of the binary contract to buy: 'yes' or 'no'.
venueYesVenue: 'kalshi' or 'polymarket'.
contractsYesContracts to buy; must be finite and positive.
market_idYesKalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets.
request_idNoOptional nonblank retry key, unique until paper_reset. Reuse only for the identical order intent.
limit_priceYesHighest price per contract to pay, in dollars, strictly between 0 and 1; ask levels above it are skipped.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.3.0
    • changedInput schema / properties / contracts / description
      Previous value: -"Contracts to buy; must be positive."New value: +"Contracts to buy; must be finite and positive."
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional nonblank retry key, unique until paper_reset. Reuse only for the identical order intent.",
      +  "title": "Request Id"
      +}
  2. Changed5 schema fields changedv1.2.2
    • addedInput schema / properties / contracts / description
      Added value: +"Contracts to buy; must be positive."
    • addedInput schema / properties / limit_price / description
      Added value: +"Highest price per contract to pay, in dollars, strictly between 0 and 1; ask levels above it are skipped."
    • addedInput schema / properties / market_id / description
      Added value: +"Kalshi market ticker (e.g. KXFEDDECISION-28JAN-H0) or Polymarket market id (e.g. 2589812), as returned by search_markets."
    • addedInput schema / properties / side / description
      Added value: +"Side of the binary contract to buy: 'yes' or 'no'."
    • addedInput schema / properties / venue / description
      Added value: +"Venue: 'kalshi' or 'polymarket'."
  3. First observedv1.2.1

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond annotations: describes the fill algorithm (walking displayed asks from best price up to limit_price, fee charged per level), persistence path and override env var, long-only and hold-at-cost constraints, the full status vocabulary including 'rejected when paper cash is short', and idempotent retry semantics with reset behavior. The simulated-write framing is consistent with readOnlyHint=false and destructiveHint=false.

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?

Front-loads the core action and the 'never sends a real order' safety point in the first two sentences, then layers mechanics, side effects, return values, and retry semantics in a logical order with no filler sentences.

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?

For a mutation-capable tool with an output schema and full param coverage, the description supplies everything an agent needs: fill mechanics, fee treatment, ledger side effects, status outcomes, and idempotency rules. The additionally enumerated return fields are redundant with the output schema but harmless.

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 baseline is 3; the description still adds real meaning by explaining how limit_price interacts with ask levels, what request_id does on retry (identical intent returns original result, changed intent errors, no request_id means a new order), and the effect of reset. It does not individually clarify venue/market_id/side/contracts beyond the schema.

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+resource: simulating buys of YES/NO contracts in a local paper ledger, filled against the live order book with fees, and explicitly distinguishes it from live trading with 'Never sends an order to a venue.' An agent can tell this apart from check_constraint_live or paper_portfolio without opening a schema.

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 a concrete usage context ('Use it to test the legs of a basket found by check_constraint_live') and a hard exclusion (venue orders are never sent; only buys supported). It does not name sibling alternatives such as paper_portfolio or paper_reset explicitly, so it falls short of a full when/when-not/alternatives statement.

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