Skip to main content
Glama
demwick

Polymarket Agent Mcp

positions.close

Close a copy trading position on Polymarket by placing a sell order (live mode) or marking it as closed (preview mode). Use the trade ID from get_positions to identify the position.

Instructions

Manually close a copy trading position by trade ID. In live mode, places a sell order on Polymarket. In preview mode, marks the position as closed in the database. Use get_positions to find the trade_id. Pro feature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trade_idYesID of the trade/position to close (from get_positions)
reasonNoReason for closing (e.g. 'manual', 'stop_loss', 'take_profit')manual
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: the action differs between live mode (places a sell order on Polymarket) and preview mode (marks as closed in the database), which is critical for understanding outcomes. However, it doesn't mention potential side effects like confirmation steps, error handling, or rate limits, leaving some gaps.

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 front-loaded with the core action, followed by mode-specific details and usage notes. Every sentence earns its place: the first defines the purpose, the second explains behavioral differences, and the third provides prerequisites and feature constraints, with no wasted words.

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 complexity (a mutation tool with mode-dependent behavior), no annotations, and no output schema, the description is fairly complete. It covers purpose, usage, and key behaviors, but lacks details on return values or error cases, which could be important for an agent invoking this tool in different contexts.

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 100%, so the schema already documents parameters well. The description adds value by explaining the source of trade_id ('from get_positions') and providing context for the reason parameter with examples ('manual', 'stop_loss', 'take_profit'), which enhances understanding beyond the schema's basic descriptions.

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 verb ('manually close') and resource ('a copy trading position by trade ID'), making the purpose specific and unambiguous. It distinguishes this tool from sibling tools like positions.list or positions.set_exit_rules by focusing on closing positions rather than listing or configuring them.

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: 'Use get_positions to find the trade_id' indicates a prerequisite, and it distinguishes between 'live mode' (places a sell order) and 'preview mode' (marks as closed), helping the agent understand context-dependent behavior. It also mentions 'Pro feature' as a usage constraint.

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