Skip to main content
Glama
ByBastianRok

polymarket-mcp-server

by ByBastianRok

Get Polymarket closed positions

polymarket_get_closed_positions
Read-onlyIdempotent

Retrieve a wallet's closed, resolved positions with realized profit and loss. Use it to review settled trading history, unlike open-position queries.

Instructions

Get a wallet's CLOSED (resolved) positions with REALIZED profit/loss — the settled history behind polymarket_get_positions (which shows only open positions).

Args:

  • wallet (string): 0x… address (42 chars).

  • limit (number): max closed positions, 1-100 (default 25).

  • response_format ('markdown' | 'json'): default 'markdown'.

Returns: { wallet, count, totalRealizedPnl, positions:[{ title, slug, outcome, conditionId, avgPrice, totalBought, realizedPnl, curPrice }] }. An unknown wallet returns 0 positions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax closed positions (1-100, default 25).
walletYesPublic wallet address (0x…, 42 chars).
response_formatNoOutput format: 'markdown' (concise, human-readable; default) or 'json' (full structured data).markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
walletYes
positionsYes
totalRealizedPnlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely useful behavior: it returns realized P/L totals and that an unknown wallet returns 0 positions rather than erroring — valuable edge-case disclosure.

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 key differentiator (closed/resolved vs open) before the Args/Returns blocks. Efficient overall, though the Args list duplicates the schema slightly.

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?

Given an output schema exists, the return-values detail is optional but present, and the edge-case note on unknown wallets closes the remaining ambiguity. Nothing needed to call 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 coverage is 100% and the Args section largely restates the schema (wallet 42 chars, limit 1-100 default 25, response_format). It adds marginal meaning beyond the structured fields, so the baseline 3 applies.

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 ('Get a wallet's CLOSED (resolved) positions') and immediately scopes it with realized P/L. It explicitly distinguishes itself from the sibling polymarket_get_positions, which 'shows only open positions'.

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?

Clearly routes the agent: use this for settled/resolved history, use polymarket_get_positions for open positions. It does not cover exclusions (e.g., when trades or user_activity would be better), so it falls short of fully explicit when/when-not guidance.

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