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.
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.
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'
Attacks that exploit this kind of access
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.
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.
close_all_positions is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
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.
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.
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.
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 →