Skip to main content
Glama

set_target

Destructive

Adjusts an open position’s take-profit to a new price on the live account, replacing older targets while leaving the stop and size unchanged.

Instructions

LIVE MONEY: acts on the real account. Move an open position's take-profit to tp_px. One limit take-profit for the whole position goes on first, then every older target on the coin is cancelled, so the position always has a target and a refused new order leaves the old one in place. Refused: no open position, or a target on the losing side of the mark (it would fill at once). Never changes the stop or the size. Use to raise or lower a target. To move the stop use set_stop; to exit now use close_position. Needs a trading key. Returns {ok, tp_px, size, replaced: old target prices}; a refusal is {ok: false, reason} with isError true and nothing sent.

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>",
      "tp_px": "<tp_px>"
    },
    "name": "set_target"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinYesCoin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL).
tp_pxYesNew target: above the mark for a long, below it for a short.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.1
    • addedInput schema / properties / coin / description
      Added 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 / tp_px / description
      Added value: +"New target: above the mark for a long, below it for a short."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond destructiveHint=true: it discloses the real-account LIVE MONEY risk, the atomic ordering (new target placed first, then older targets on the coin cancelled, so a refused order leaves the old target intact), the key requirement, and the return/refusal payload shape. The one gap is that it does not say what happens to targets on other coins or whether the cancel step is rate-limited, but the essential mutation semantics are covered.

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-loads the critical warning and the action, then the ordering guarantee, then refusals and routing. Dense but every clause carries operational meaning; the return-shape sentence could be trimmed slightly against the sibling-dispatch sentence.

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?

For a two-parameter mutation on a live account with no output schema, it covers side effects, ordering, refusal conditions, auth, and the return payload shape. Missing only edge detail such as multi-coin target scope and whether repeated calls are idempotent, which are minor against the coverage it does provide.

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 baseline is 3; the description still adds value by explaining why a target on the losing side of the mark is refused ('it would fill at once'), which gives tp_px a validity rule the schema only restates geometrically. It states the replacement return ('replaced: old target prices') but adds nothing further on coin naming beyond the schema's dex:SYMBOL note.

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?

Specific verb and resource: 'Move an open position's take-profit to tp_px', with the scope of the change bounded explicitly ('Never changes the stop or the size'). It also names the adjacent tools it is not (set_stop, close_position), so an agent can route without opening a 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?

States when to use it ('Use to raise or lower a target') and names the alternatives for the neighbouring intents ('To move the stop use set_stop; to exit now use close_position'). Refusal preconditions ('no open position, or a target on the losing side of the mark') give the agent the negative cases as well.

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