Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Scale Out

workflow.run_scale_out
Read-only

Scale-out planner: P&L, ROI, and cumulative P&L for each partial exit level. Use when user wants to take profit at multiple targets: "close 30% at $90k, 30% at $95k, 40% at $100k, what's my total P&L?". Returns: per-level pnl, weightedAvgExitPrice, totalRoi.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes
exitsYes
total_sizeYesTotal position size in base currency
entry_priceYesEntry price
contractTypeNolinear = USDT-margined (default), inverse = coin-margined. total_size is USD notional (contracts) for inverse, and per-level pnl comes back denominated in the base coin.
fee_open_pctNoOpen fee rate (default 0.0002)
fee_close_pctNoClose fee rate (default 0.0005)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined. total_size is USD notional (contracts) for inverse, and per-level pnl comes back denominated in the base coin.",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this is a safe, read-only, closed-world computation, so the safety burden is lifted. The description adds the return keys (per-level pnl, weightedAvgExitPrice, totalRoi), but there is no output schema and it discloses nothing about weighting assumptions, fee handling, or how inverse-contract denomination affects results beyond what the contractType schema field states.

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, then usage, then return shape, in three compact sentences with an illustrative example that earns its space. No filler, though the example is somewhat verbose relative to the rest.

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?

With no output schema, listing the returned fields is the right compensation, and it does so. The main gap is that two parameters (side, exits[].price) are undocumented in the prose and no output schema exists to catch edge cases like minItems=2 or the inverse-denomination behavior that affects the returned pnl.

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 71%, so most parameters are already documented in the schema, and the description's example implicitly conveys the exits array shape (price/pct pairs). It adds no syntax or semantics for side or exits[].price beyond the schema, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific tool type (scale-out planner) and states exactly what it computes: P&L, ROI and cumulative P&L per partial exit level. That is far more specific than the title "Scale Out", though it never distinguishes itself from adjacent siblings like run_exit_target or run_pnl_planning.

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?

It gives a concrete trigger ("Use when user wants to take profit at multiple targets") reinforced by a worked example of the user utterance. There is no guidance on when NOT to use it or which sibling handles the single-target or planning case, so it stops short of a 5.

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.