Skip to main content
Glama

Exit a position

sell_trade
DestructiveIdempotent

Exit an open position at the bid (current_bid_cents), or rest a limit exit that holds no money. No bid: a market sell cannot. A closed trade answers its terminal state. route=best may split: fills lists each leg. route=kalshi sells at Kalshi's bid. contract_note on every exit of a non-Kalshi fill. dry_run=true sells nothing (a limit exit shows crosses_now). Selling is never gated by a membership. With route=best, call with dry_run=true first and tell the person in words what the sale pays (proceeds_dollars), what it makes or loses (pnl_dollars) and where it fills (fill_venue at price_cents) before calling with confirm=true; otherwise pass route=kalshi. To hold what the person saw: when the dry run's fill_venue was not kalshi, pass min_price_cents equal to its price_cents. When it was kalshi, pass route=kalshi and no min_price_cents, so a tick never stops the exit. confirm=true and a fresh idempotency_key, except dry_run. live=true sells on Kalshi. poly_intl=true sells on Polymarket International (not US). Pass one. Default is paper. This server places paper trades only: a call with live or poly_intl is refused (live_not_hosted).

Input Schema

NameRequiredDescriptionDefault
liveNoKalshi sell. Not poly_intl.
sideNo
routeNoDefault best.
tickerNo
confirmNoREQUIRED to sell: true. Not with dry_run.
dry_runNoPreview; sells nothing.
token_idNopoly_intl CLOB token.
trade_idNoFrom get_positions.
contractsNo
poly_intlNoPolymarket International sell. Not live, not US.
expires_atNoISO time a gtc order stops resting.
time_in_forceNogtc (default) rests up to 365 days; ioc and fok fill now or come back canceled.
idempotency_keyNoREQUIRED to sell: a fresh UUID v4. Not with dry_run.
min_price_centsNoMarket sells: refuse a bid below this (server-enforced).
limit_price_centsNoA LIMIT exit at this price or better.

Output Schema

NameRequiredDescriptionDefault
fillsNo
notesNo
orderNo
routeNo
tradeNo
filledNo
placedNo
statusNo
venuesNo
dry_runNo
web_urlNo
trade_idNo
contractsNo
rule_noteNo
expires_atNo
fill_venueNo
order_typeNo
route_noteNo
crosses_nowNo
pnl_dollarsNo
price_centsNo
route_reasonNo
contract_noteNo
time_in_forceNo
already_closedNo
proceeds_dollarsNo
limit_price_centsNo
kalshi_price_centsNo
price_improvement_centsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, idempotentHint=true and openWorldHint=true, but the description adds substantial context beyond them: a closed trade returns its terminal state, route=best may split fills into legs, contract_note appears on every non-Kalshi exit, selling is never membership-gated, and live/poly_intl calls are refused with live_not_hosted on this paper-only server. This is rich disclosure the structured fields do not carry.

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

Conciseness3/5

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

Purpose is front-loaded and every clause carries information, but the procedural tail is a dense run-on of sentence fragments ('Live=true sells on Kalshi. Pass one. Default is paper.') that is harder to parse than it needs to be. Size is defensible for a 15-parameter tool, but the telegraphic style costs readability.

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, return values needn't be explained, yet the description still names the fields an agent must surface (proceeds_dollars, pnl_dollars, fill_venue, price_cents, crosses_now). It covers venue selection, the paper-only refusal, the split-order case, and the confirm/idempotency dance — everything needed to call 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 description coverage is already 80%, so the schema carries most parameter documentation; some description content (confirm/idempotency_key requirements, time_in_force rest semantics) overlaps it. However, the description adds genuine semantics the schema lacks — what route=best vs route=kalshi means for fill venue, the relationship between the dry run's fill_venue and min_price_cents, and the 'pass one' rule for live/poly_intl.

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 opening sentence states a specific verb and resource — 'Exit an open position at the bid (current_bid_cents), or rest a limit exit' — and immediately distinguishes the two exit modes. It reads clearly against the buy-side sibling place_trade. An agent can tell what this does 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?

It gives explicit branching: with route=best, run dry_run=true first, report proceeds/pnl/fill_venue to the person, then re-call with confirm=true; otherwise pass route=kalshi. It also states when to pass min_price_cents based on the dry run's fill_venue, and that confirm plus a fresh idempotency_key are required except for dry_run. Alternative paths and their selecting conditions are named.

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.

Resources