close_all_positions

Close every open Pear Protocol position with a single executionType (MARKET or TWAP). Returns a per-position result array with success/error. WRITE: executes real trades. Requires PEAR_TRADE_ENABLED=true.

Server Mcp Pear marvelnwachukwu/mcp-pear
Category Execute
Risk class High
Parameters 00 required

What close_all_positions does on Mcp Pear

AI agents invoke close_all_positions to trigger actions in Mcp Pear. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

Why close_all_positions needs a policy

This tool executes real trades to close ALL open positions simultaneously. While it falls under financial operations in spirit, the primary mechanism is executing trades/orders on an exchange. The blast radius is critical because a misuse would liquidate every open position at once, potentially causing massive financial loss with no ability to reverse market orders.

From the tool's definition 'Close every open Pear Protocol position with a single executionType (MARKET or TWAP)' and 'WRITE: executes real trades'

Questions about close_all_positions

What does the close_all_positions tool do? +

Close every open Pear Protocol position with a single executionType (MARKET or TWAP). Returns a per-position result array with success/error. WRITE: executes real trades. Requires PEAR_TRADE_ENABLED=true. It is categorised as a Execute tool in the Mcp Pear MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on close_all_positions? +

Register the Mcp Pear MCP server in PolicyLayer and add a rule for close_all_positions: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Pear. Nothing to install.

What risk level is close_all_positions? +

close_all_positions is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit close_all_positions? +

Yes. Add a rate_limit block to the close_all_positions rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block close_all_positions completely? +

Set action: deny in the PolicyLayer policy for close_all_positions. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides close_all_positions? +

close_all_positions is provided by the Mcp Pear MCP server (marvelnwachukwu/mcp-pear). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.