Skip to main content
Glama
agent-next

polymarket-paper-trader

Sell shares

sell

Liquidate held shares of a Polymarket or Kalshi outcome for paper cash, filling immediately against the live order book and recording simulated trade fees.

Instructions

Sell held shares of a Polymarket or Kalshi ('kalshi:') outcome for paper cash.

Fills immediately against the live order book and records the trade and fee (simulated; no real order). Use place_limit_order with side 'sell' to rest an exit at your price, or resolve to collect payout on a closed market.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sharesYesNumber of shares to sell, at most the shares held in that outcome.
accountNoPaper account name; any name without '/', '\', '..' or surrounding spaces. Each name is a separate local account. Default 'default'.default
outcomeYesOutcome to trade, e.g. 'yes' or 'no' (case-insensitive); must match one of the market's outcomes.
order_typeNo'fok' (fill-or-kill: all or nothing) or 'fak' (fill-and-kill: partial fills allowed). Default 'fok'.fok
slug_or_idYesMarket slug or condition ID. For a Kalshi market use the slug 'kalshi:<TICKER>', e.g. 'kalshi:KXNBAGAME-26OCT16DENLAL-LAL'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.13
    • addedInput schema / properties / account / description
      Added value: +"Paper account name; any name without '/', '\\', '..' or surrounding spaces. Each name is a separate local account. Default 'default'."
    • addedInput schema / properties / order_type / description
      Added value: +"'fok' (fill-or-kill: all or nothing) or 'fak' (fill-and-kill: partial fills allowed). Default 'fok'."
    • addedInput schema / properties / outcome / description
      Added value: +"Outcome to trade, e.g. 'yes' or 'no' (case-insensitive); must match one of the market's outcomes."
    • addedInput schema / properties / shares / description
      Added value: +"Number of shares to sell, at most the shares held in that outcome."
    • addedInput schema / properties / slug_or_id / description
      Added value: +"Market slug or condition ID. For a Kalshi market use the slug 'kalshi:<TICKER>', e.g. 'kalshi:KXNBAGAME-26OCT16DENLAL-LAL'."
  2. First observedv0.4.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, idempotent=false, openWorld=true, so the mutation profile is covered. The description adds real value beyond that: it fills immediately against the live order book, records the trade and fee, and is simulated (no real order). It does not discuss fill failure behavior for the default 'fok' order type, which would be the next useful detail.

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 in the first sentence, followed by behavioral detail and then sibling alternatives. Two short paragraphs with essentially no waste, though the parenthetical '(simulated; no real order)' partially duplicates the paper-cash framing of the first line.

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?

An output schema exists, so return values need no explanation, and the description covers the mutation semantics, execution model, and sibling routing. Nothing an agent needs to invoke this correctly is missing.

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%, so all five parameters, including the 'fok'/'fak' order_type and the 'kalshi:<TICKER>' slug convention, are already documented in the schema. The description repeats the Kalshi slug example but adds no syntax or constraint beyond it, so this is baseline 3.

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 (sell) and resource (held shares of a Polymarket/Kalshi outcome) for paper cash, and it is trivially distinguishable from the sibling 'buy', 'place_limit_order', and 'resolve'. An agent knows exactly what operation this performs 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 Guidelines5/5

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

Explicitly routes away from the two plausible alternatives: use place_limit_order with side 'sell' to rest an exit at your price, or resolve to collect payout on a closed market. This gives both the alternative name and the condition selecting it, leaving nothing to inference.

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