Skip to main content
Glama
demwick

Polymarket Agent Mcp

orders.sell

Sell open positions on Polymarket by trade or condition ID. Execute live sell orders or preview realized P&L calculations in simulation mode.

Instructions

Sell an open position by trade_id (from get_positions) or condition_id. In live mode, places a sell order on Polymarket. In preview mode, marks the position as sold in the database and calculates realized P&L.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trade_idNoTrade ID to sell (from get_positions)
condition_idNoCondition ID to sell (finds matching open position)
priceNoLimit price (omit for current market price)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains the dual behavior in live vs. preview modes, including that live mode interacts with Polymarket while preview mode updates the database and calculates P&L. However, it doesn't mention potential side effects like rate limits, authentication requirements, or error conditions, leaving some behavioral aspects unclear.

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?

The description is efficiently structured in two sentences: the first states the core purpose and parameters, the second explains the dual mode behavior. Every sentence adds essential information with zero redundancy, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (financial transaction with dual modes) and lack of annotations/output schema, the description does well by explaining the core operation and behavioral modes. However, it doesn't cover return values, error handling, or prerequisites (e.g., needing an open position), leaving some contextual gaps that could affect agent usage.

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 the schema already fully documents all three parameters. The description adds minimal value beyond the schema by mentioning that trade_id comes from 'get_positions' and condition_id 'finds matching open position', but doesn't provide additional semantic context like parameter precedence or interaction rules. This meets the baseline for high schema 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?

The description clearly states the specific action ('Sell an open position') and identifies the required identifiers ('trade_id or condition_id'). It distinguishes this tool from siblings like 'orders.buy' (opposite action) and 'positions.close' (different closing mechanism) by specifying it's for selling positions obtained from 'get_positions'.

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?

The description provides explicit guidance on when to use this tool: for selling open positions using identifiers from 'get_positions'. It distinguishes between 'live mode' (places actual sell order) and 'preview mode' (simulates sale in database), offering clear alternatives based on operational context. No misleading guidance is present.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/demwick/polymarket-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server