Skip to main content
Glama

place_bracket

Destructive

Open a live bracketed trade with an entry, exact stop-loss, and take-profit, sized from your risk profile; choose market or resting limit entry and preview with dry_run.

Instructions

LIVE MONEY: acts on the real account. Open one trade as a bracket: an entry plus an exact stop-loss and take-profit, sized by the risk profile exactly as size_trade reports. The side follows the levels (stop below the entry or mark is a long). entry_px rests a limit order and the stop and target attach when it fills; omit entry_px to enter at market now. The take-profit is placed 0.5% inside tp_px so it fills before the level (the result shows both). leverage defaults to the profile's max and is set on the coin first. Refused, with nothing sent: reward to risk under min_r (never below 2R), a stop outside half the distance to liquidation, a coin not listed on this network, or a second position or resting entry on the coin, unless add=true, which tops an open same-side position up to full size with a stop no wider than the current one. dry_run=true runs every check and returns the sizing without placing. Call only when the user asked for this trade; size it first with size_trade, adjust it later with set_stop or set_target, exit with close_position. Needs a trading key. Returns {ok, placed, mode, entry_px, stop_px, tp_px, size, leverage, result, network, builder_fee}; a refusal is ok=false, placed=false with the reason. If a market entry fills but the venue refuses the stop, the result is ok=false, placed=true, reason "FILLED WITHOUT A STOP": place one at once with set_stop.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "coin": "<coin>",
      "stop_px": "<stop_px>",
      "tp_px": "<tp_px>"
    },
    "name": "place_bracket"
  }
}

Input Schema

NameRequiredDescriptionDefault
addNoTop up an open same-side position to full size; the new stop may not be wider than the current one.
coinYesCoin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL).
min_rNoLeast reward-to-risk to accept; never below the 2R floor.
tp_pxYesTake-profit price: above the entry for a long, below it for a short.
dry_runNotrue: size and check the order, place nothing.
stop_pxYesStop-loss price: below the entry for a long, above it for a short.
entry_pxNoLimit entry price: the order rests there and the stop and target attach on fill. Omit to enter at market.
leverageNoLeverage for the coin, capped by the risk profile's max leverage.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.6.1
    • changedInput schema / properties / add / description
      Previous value: -"Top up an open same-side position to the full-port size; the stop may not be wider than the one resting."New value: +"Top up an open same-side position to full size; the new stop may not be wider than the current one."
    • changedInput schema / properties / coin / description
      Previous value: -"e.g. xyz:BRENTOIL"New value: +"Coin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL)."
    • addedInput schema / properties / dry_run / description
      Added value: +"true: size and check the order, place nothing."
    • addedInput schema / properties / entry_px / description
      Added value: +"Limit entry price: the order rests there and the stop and target attach on fill. Omit to enter at market."
    • addedInput schema / properties / leverage / description
      Added value: +"Leverage for the coin, capped by the risk profile's max leverage."
    • addedInput schema / properties / min_r / description
      Added value: +"Least reward-to-risk to accept; never below the 2R floor."
    • addedInput schema / properties / stop_px / description
      Added value: +"Stop-loss price: below the entry for a long, above it for a short."
    • addedInput schema / properties / tp_px / description
      Added value: +"Take-profit price: above the entry for a long, below it for a short."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Far exceeds what destructiveHint=true conveys: it declares LIVE MONEY on the real account, enumerates the exact refusal conditions (sub-2R, stop beyond half the liquidation distance, unlisted coin, existing position), documents the 0.5% take-profit offset and the leverage-on-coin-first ordering, and discloses the 'FILLED WITHOUT A STOP' partial-failure mode with its remedy. The only thing left implicit is any rate limiting or key-permission granularity beyond 'needs a trading key'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the safety-critical fact (LIVE MONEY) and the core action, then ordered into mechanics, refusals, guidance, and return shape. It is dense and long, but nearly every clause carries operational information; a few refusal clauses could be trimmed without loss.

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?

For an 8-parameter live-money mutation with no output schema, the definition supplies everything an agent needs: auth requirement, dry-run path, refusal semantics, the full return object shape, and the recovery action for a filled-without-stop outcome. Nothing material is missing.

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 coverage is 100%, so the baseline is 3, but the description adds genuine semantics the schema does not: leverage defaults to the profile's max, min_r can never go below the 2R floor, entry_px makes the stop and target attach only on fill, and add=true caps the new stop at the current width. These are behavioral constraints rather than restatements, lifting it above baseline.

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?

States a specific verb and resource — 'Open one trade as a bracket: an entry plus an exact stop-loss and take-profit' — and names the sizing source (risk profile, as size_trade reports). An agent can distinguish it from size_trade, set_stop, set_target, and close_position without opening any schema.

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?

Gives explicit when-to-call ('Call only when the user asked for this trade'), a required precondition ('size it first with size_trade'), and the follow-up routing for later adjustments and exits (set_stop, set_target, close_position). dry_run=true is offered as the safe preview path, and add=true is scoped to top-ups of an open same-side position.

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