Skip to main content
Glama
agent-next

polymarket-paper-trader

Resolve market positions

resolve
Idempotent

Settle a paper account's positions in one closed market, paying $1 per winning share and canceling resting orders. Use when a market has closed and you need payouts.

Instructions

Settle an account's positions in one closed market, paying $1 per winning share.

Writes payouts to the local account and cancels resting orders on that market. Fails if the market is not closed, the winner is ambiguous, or no position is held. Use resolve_all to settle every closed market at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoPaper account name; any name without '/', '\', '..' or surrounding spaces. Each name is a separate local account. Default 'default'.default
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. Changed2 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 / 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.5/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly=false, idempotent=true, destructive=false), but the description adds real behavioral context beyond them: payouts are written to the local account and resting orders on that market are cancelled. The enumerated failure modes further reduce ambiguity. Slightly short of 5 only because it doesn't say whether cancelling resting orders is reversible or how the payout is recorded.

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?

Three sentences, no waste, front-loaded with the core action and payout rule before side effects and the alternative. Every sentence carries distinct information.

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?

Output schema exists so return values needn't be described. Between the failure conditions, side effects, payout rule, and the resolve_all pointer, an agent has everything needed to decide and call 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%, so both parameters (account, slug_or_id) are already fully documented in the schema. The description adds only the payout rate, nothing about the slug formats or account semantics. Baseline 3 for high coverage.

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 and resource ('Settle an account's positions in one closed market') with the payout rule ($1 per winning share). This clearly distinguishes it from sibling resolve_all, which is scoped to all closed markets at once.

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 the agent: use resolve_all to settle every closed market at once, and names the failure conditions (market not closed, ambiguous winner, no position held) that gate a valid call. Alternatives and prerequisites are both present.

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