Skip to main content
Glama

Close or notify later, while you are away

close_or_notify_later
Idempotent

Use whenever the user wants something done later on a held position: "close it if still open in 3 days", "tell me if its funding passes 50% a year", "close half below 94000". TradeHub keeps watching after this session ends; you cannot schedule checks yourself. Up to 5 rules, each fires once and either notifies the person or closes part of the position reduce-only. Not a stop-loss. A new plan replaces the old; rules=[] removes it. Next: get_my_positions.

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": {
      "symbol": "<symbol>",
      "rules": "<rules>"
    },
    "name": "close_or_notify_later"
  }
}

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 if connected, else your only connected exchange, else the sandbox
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. Changed1 schema field changed
    • removedInput schema / properties / venue / default
      Removed value: -"hyperliquid"
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the key behavior an agent cannot infer: the watch persists after the session ends and the agent itself cannot schedule checks. It also states the 5-rule cap, single-fire semantics, reduce-only partial closes, and that a new plan replaces the old while rules=[] clears it — replacement/removal semantics are the most important thing to know for a call carrying idempotentHint=true. There is a mild tension between 'closes part of the position' and destructiveHint=false, but the description scopes closes as user-authorized and reduce-only, so it reads as clarification rather than contradiction.

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 usage trigger and examples, then behavior — the right order for an agent scanning for relevance. Slightly dense in places ('Up to 5 rules, each fires once and either notifies the person or closes part of the position reduce-only' packs three facts into one clause) and mildly redundant with the schema's maxItems: 5, but no sentence is wasted.

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?

This is a high-complexity tool (conditional scheduling, nested rule objects, deferred execution, destructive-adjacent closes), and the description covers persistence, limits, replacement, removal, and the notify-vs-close distinction. With an output schema present, return values need not be explained, so nothing an agent needs in order to call it correctly 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; the description earns an extra point by translating parameter combinations into intent examples ('close half below 94000' shows when+value+action+close_fraction working together) and by defining the empty-array case for rules, which the schema mentions only tersely. It does not restate the venue fallback chain or funding-fraction semantics, but those are already fully documented in the schema.

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?

Names a specific verb-and-resource pair (schedule a later close or notification on a held position) and immediately grounds it in three concrete user phrasings. It explicitly distances itself from the nearest sibling by stating 'Not a stop-loss', which points away from set_stop_loss_rule and set_price_alert without needing their schemas.

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?

Opens with an explicit trigger condition ('whenever the user wants something done later on a held position') plus three example utterances that map directly to supported rule shapes. It also gives an exclusion ('Not a stop-loss') and a workflow pointer ('Next: get_my_positions'), so an agent knows both when to pick this and what to do afterward.

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