Skip to main content
Glama

Close my net exposure to a coin across exchanges

close_net_exposure
Destructive

Bring the net position in one coin across every exchange (long minus short) to zero, or to keep_fraction of it, by closing the larger side with reduce-only market orders, largest position first. It never opens a position: being long on one exchange and short on another stays as a hedge. Use when the person asks to hedge, flatten or cut their overall exposure to a coin. Not for one position (use close_position). Third-party apps reduce only positions they opened. Input: symbol, optional keep_fraction. A close cannot be undone. Next: get_my_positions (its net).

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

Input Schema

NameRequiredDescriptionDefault
bookNoreal (exchange accounts) or sandbox; needed only when the coin is held in both
symbolYesBase coin, e.g. BTC
keep_fractionNoHow much of the net to keep, a fraction: 0 = net flat (the default), 0.5 = halve it

Output Schema

NameRequiredDescriptionDefault
bookYesreal or sandbox
closesYesEach reduce-only close, largest position first
symbolYesBase coin
deprecationNoPresent only while this tool is deprecated: replacement, removal_date, changelog
net_after_baseYesNet after, in the base coin (e.g. BTC), not USD, read back from the venues
net_before_baseYesNet before, in the base coin (e.g. BTC), not USD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, but the description adds substantial detail beyond them: it never opens a position, cross-exchange long/short hedging is preserved, orders are reduce-only market orders executed largest-position-first, third-party apps only reduce positions they opened, and the close cannot be undone. These are exactly the behavioral facts an agent needs before authorizing an irreversible action.

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 core action, then behavior, routing, caveats, inputs, and next step — each sentence carries information. It is dense to the point of being packed (the third-party-app caveat lands as a bare fragment), but nothing is redundant.

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 a destructive, multi-exchange mutation with an output schema (so return values need no explanation), the description covers mechanism, ordering, irreversibility, hedging semantics, exclusions, and the suggested next call. Nothing an agent needs in order to invoke it correctly is missing.

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

Parameters3/5

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

Schema coverage is 100%, so each of symbol, keep_fraction and book is already documented with format and defaults. The description restates that input is symbol plus optional keep_fraction and frames keep_fraction as keeping part of the net, but adds no new formatting or validation meaning, and never mentions the book parameter. Baseline 3 applies when the schema does the heavy lifting.

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 with explicit scope: 'Bring the net position in one coin across every exchange (long minus short) to zero... by closing the larger side with reduce-only market orders.' It distinguishes itself from the nearest sibling by naming close_position as the single-position tool, so an agent can route without opening either 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 an explicit when-to-use trigger ('asks to hedge, flatten or cut their overall exposure to a coin'), an explicit exclusion ('Not for one position (use close_position)'), and a follow-up step ('Next: get_my_positions'). Both the positive condition and the alternative are named.

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