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

NameRequiredDescriptionDefault
sideYesTrade direction: "long" or "short"
exitsYesPartial exit levels (2 to 10). Each: { price, pct }, e.g. [{ "price": 90000, "pct": 30 }, { "price": 95000, "pct": 70 }]; the pct values must not sum to more than 100.
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. Changed3 schema fields changed
    • addedInput schema / properties / exits / description
      Added value: +"Partial exit levels (2 to 10). Each: { price, pct }, e.g. [{ \"price\": 90000, \"pct\": 30 }, { \"price\": 95000, \"pct\": 70 }]; the pct values must not sum to more than 100."
    • addedInput schema / properties / exits / items / properties / price / description
      Added value: +"Exit price for this level"
    • addedInput schema / properties / side / description
      Added value: +"Trade direction: \"long\" or \"short\""
  2. 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"
      +}
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds the return shape (per-level pnl, weightedAvgExitPrice, totalRoi), which is valuable since no output schema exists, though it says nothing about fee defaults (delegated to schema) or numeric edge cases like pct sums below 100.

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 purpose, then the usage condition, then the return fields. The quoted user example is long but earns its place by pinning down exactly what 'scale out' means; only the quoted scenario is slightly verbose.

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 7-parameter read-only computation tool with no output schema, the description supplies the key return fields and a usage scenario, and the schema carries the rest. It is complete enough to call correctly, with only minor gaps around fee handling and boundary conditions.

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 including the nested exits, contractType margin semantics, and fee rates is already documented in the schema. The description adds no parameter detail beyond what structured fields provide, making the baseline 3 appropriate.

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+resource (scale-out planner computing P&L, ROI, cumulative P&L per partial exit level) and the concrete worked example ('close 30% at $90k... what's my total P&L?') makes it immediately distinguishable from single-target exit tools 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?

"Use when user wants to take profit at multiple targets" gives a clear trigger condition, reinforced by the example. It does not name a sibling or state exclusions, so it stops short of the 5-level when/when-not/alternatives guidance.

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.