Skip to main content
Glama

Leave a plan on a position

set_position_plan_close_or_notify_later
Idempotent

Have TradeHub act on a held position later, with no agent connected: "close it if still open in 3 days", "tell me if its funding passes 50% a year", "close half below 94000". Up to 5 rules, each fired once: when price_above / price_below (mark), held_hours (since set) or funding_above (yearly rate it pays, 0.5 = 50%), then notify the person or close close_pct reduce-only. thesis: why it is open, what proves it wrong, for later sessions. Use right after entry, not your own timers. Not a stop-loss. A new plan replaces the old; rules=[] removes it. Next: get_my_open_positions.

Input Schema

NameRequiredDescriptionDefault
rulesYesUp to 5 rules, each fires once; [] removes the plan
venueNoVenue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid, else your only connected venue, else sandboxhyperliquid
symbolYesBase coin, e.g. BTC
thesisNoWhy the position is open and what would prove it wrong, for the next session to read back; seen only by you and the person

Output Schema

NameRequiredDescriptionDefault
okYesTrue when the plan is stored
planYesThe plan now on the position; null after rules=[]
venueYesVenue name
symbolYesBase coin
mark_priceYesMark when the plan was set, USD per coin
deprecationNoPresent only while this tool is deprecated: replacement, removal_date, changelog

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, it discloses the 5-rule cap, that each rule fires exactly once, that a new plan overwrites the old and an empty array removes it, that notify routes to Telegram/events/webhooks, and that close is reduce-only with a percentage. This is the kind of consequence-level detail an agent needs before committing a position to a deferred automation.

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 purpose and examples, and the operative constraints (when to use, what it is not, replacement semantics) come before the trailing navigation hint. It is dense with quoted example strings that partially restate the same semantics as the rule fields, which costs a little economy but not clarity.

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?

An output schema exists, so return values need no explanation. Combined with full schema coverage and annotations, the description covers timing, alternatives, side effects, replacement/removal, and the next call an agent should make.

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?

At 100% schema coverage the baseline is 3, and the description still adds meaning: it clarifies that price triggers use the mark, that funding is a yearly fraction (0.5 = 50%), and illustrates partial exit with "close half below 94000". It does not add anything about the venue or thesis parameters beyond the schema, so it stops short of a 5.

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 concrete verb and resource: have the system act on a held position at a later time while no agent is connected, and backs it with three quoted example rules. It also explicitly rules out the nearest sibling concept ("Not a stop-loss"), so an agent can separate it from set_stop_loss_rule and set_price_alert at a glance.

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 timing ("Use right after entry, not your own timers"), an exclusion ("Not a stop-loss"), replacement semantics ("A new plan replaces the old; rules=[] removes it"), and a next step ("Next: get_my_open_positions"). Nothing about when to select this tool is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources