Skip to main content
Glama

Propose close-all

propose_close_all_positions

APPROVAL CARD ONLY — NEVER auto-executed: propose flattening EVERY open position at once (or one venue/pair scope) for in-app approval. Records the proposal only — no order is placed, nothing is cancelled. Needs the trade:propose scope (PAT).

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": {
      "rationale": "<rationale>"
    },
    "name": "propose_close_all_positions"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairNoOptional pair filter (e.g. BTC/USDT) — flatten only this market. Omit for everything.
exchangeNoOptional CEX slug to flatten one venue only. Omit for every connected venue.
rationaleYesWhy flatten now
order_typeNoDefault market.
limit_priceNoRequired for order_type=limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: 'APPROVAL CARD ONLY — NEVER auto-executed', 'Records the proposal only — no order is placed, nothing is cancelled', and the required 'trade:propose scope (PAT)' auth requirement. This resolves the ambiguity that flattening-everything would otherwise create against destructiveHint=false, and it tells the agent that repeated calls create new proposals rather than reusing one.

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

Conciseness5/5

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

Three tight clauses, front-loaded with the highest-stakes warning, then the scope, then the side-effect disclaimer and auth requirement. No filler and nothing buried at the end.

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 5-parameter proposal tool with no output schema, the definition covers the critical facts: it is non-executing, requires a PAT scope, and is scoped by venue/pair. The one gap is what the agent gets back from the call (a proposal identifier or approval card reference), which matters since there is no output schema to fall back on.

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 description coverage is 100%, so every parameter is already documented, including pair/exchange scoping and the limit_price dependency on order_type. The description only restates the optional venue/pair scope and adds no format or constraint detail beyond the schema, so the baseline 3 applies.

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 ('propose flattening EVERY open position at once') plus the optional narrowing scope ('one venue/pair scope'), which is enough to distinguish it from the single-position sibling close_position and from execute_trade 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Makes the use case explicit: flatten everything at once, or restrict to one venue/pair, and the 'for in-app approval' framing tells the agent this is the proposal step of a workflow. It stops short of naming a concrete alternative (e.g., close_position for a single market or execute_trade for the actual execution), so the when-not guidance is implied rather than stated.

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.