Skip to main content
Glama

Open Position with TP/SL

open_with_bracket
Destructive

Open a perpetual futures position with attached take-profit and stop-loss orders, ensuring protection even when the bot is offline. Specify symbol, side, and size; preview before confirming.

Instructions

Open a perp position with EXCHANGE-NATIVE take-profit / stop-loss attached, so the position is protected even if this bot or the user's computer is off, Pacifica closes it at the trigger price. side: 'long'/'short'. usd: notional size. stop_loss_pct / take_profit_pct: distance from entry as a percent (e.g. 3 = 3%); 0 disables that leg. Triggers use mark price. IMPORTANT: places a REAL order, call with confirm=false first to preview, confirm=true only after the user approves. Carries builder code 'mustache' (if approved).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usdYes
sideYes
symbolYes
confirmNo
stop_loss_pctNo
take_profit_pctNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the annotations (destructiveHint=true, openWorldHint=true), the description discloses key behavioral traits: it places a real order, has a two-step confirmation flow, uses mark price for triggers, and remains safe even if the bot is offline. This adds significant behavioral context, with no contradictions to annotations.

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 concise and well-structured: it opens with the core purpose, then parameter explanations, then an important confirmation warning, and finally a note about builder code. Every sentence serves a purpose, and the information is front-loaded.

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 the tool's complexity (six parameters, two-phase confirmation, external order placement), the description covers all essential aspects: the protected nature, trigger price, parameter semantics, and safety flow. An output schema exists, so return values need not be described. The description is complete enough for correct tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explains the meaning of side ('long'/'short'), usd (notional size), stop_loss_pct/take_profit_pct (percent distance, 0 disables). This adds meaning beyond the schema, which has no property descriptions. Confirm behavior is also described in the usage note. Symbol is self-explanatory, so coverage is effectively complete.

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 tool's primary purpose: opening a perp position with exchange-native take-profit and stop-loss protection. It uses a specific verb-resource pairing ('Open a perp position') and differentiates from sibling tools like open_funding_position and open_pacifica_leg by emphasizing the attached TP/SL brackets.

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?

The description provides clear usage context: it explains the need to call with confirm=false first and then confirm=true after user approval, and it details parameter usage. However, it does not explicitly mention when to avoid this tool or recommend alternatives, so while guidance is present, exclusions are missing.

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/oceanagent/ocean-agent'

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