Skip to main content
Glama

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

Scenario Planning

workflow.run_scenario_planning
Read-only

Run a scenario analysis: compute PnL for multiple price-change percentages at once. Edge cases: entryPrice and size above zero; at least one price change in percent; a change of -100 or less is refused for inverse contracts and exactly -100 is allowed for linear only; fees optional (default 0). Not covered: funding, liquidation along the path, slippage, and the probability of each scenario. Use when user asks "show me my P&L if BTC moves -10%, -5%, +5%, +10%". Returns: array of { deltaPct, exitPrice, netPnl, roe }.

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": {
      "side": "<side>",
      "entryPrice": "<entryPrice>",
      "size": "<size>",
      "deltasPct": "<deltasPct>"
    },
    "name": "workflow.run_scenario_planning"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYesTrade direction: "long" or "short"
sizeYesPosition size in base asset
deltasPctYesList of price change percentages, e.g. [-10, -5, 0, 5, 10]. Must be at least -100 (exactly -100 only for linear contracts; inverse contracts need more than -100)
entryPriceYesEntry price
feeOpenPctNoOpening fee fraction
feeClosePctNoClosing fee fraction
contractTypeNolinear = USDT-margined (default), inverse = coin-margined. For inverse, size is USD contracts and pnl/fees come out in the base coin.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / side / description
      Added value: +"Trade direction: \"long\" or \"short\""
  2. Changed1 schema field changed
    • changedInput schema / properties / deltasPct / description
      Previous value: -"List of price change percentages, e.g. [-10, -5, 0, 5, 10]"New value: +"List of price change percentages, e.g. [-10, -5, 0, 5, 10]. Must be at least -100 (exactly -100 only for linear contracts; inverse contracts need more than -100)"
  3. Changed1 schema field changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined. For inverse, size is USD contracts and pnl/fees come out in the base coin.",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
  4. Added

TDQS

A4/5.0
Behavior4/5

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

The annotations already declare this as a safe read-only computation, and the description adds real value on top: validation constraints (entryPrice/size>0, at least one delta, -100 refusal for inverse contracts, -100 allowed for linear only), the optional-fee default of 0, and explicit scope exclusions. It doesn't state precision/rounding or ordering of outputs, keeping it short of a 5.

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?

The content is front-loaded with the core purpose, then edge cases, then exclusions, then return shape; each sentence is substantive. It is dense but not bloated, though a reader must parse a fairly long run-on edge-case sentence.

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 7-parameter computational tool with no output schema, the description supplies validation rules, exclusions, and the return object shape ({deltaPct, exitPrice, netPnl, roe}), so an agent can call it and interpret results without guesswork. Nothing essential 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 the schema already documents all seven parameters, including the enum and default behavior. The description adds some meaning: fee default of 0 and the -100 boundary rule, plus the linear/inverse implication. Those are helpful but largely overlap with what the schema already states, so the baseline of 3 fits.

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 uses a specific verb and resource: 'compute PnL for multiple price-change percentages at once', which clearly identifies it as a scenario/price-shock PnL tool. It doesn't explicitly differentiate from siblings like run_pnl_planning or run_forex_scenario, but the multi-delta nature and the concrete example make the scope distinct enough.

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 an explicit when-to-use trigger ('Use when user asks "show me my P&L if BTC moves..."') and lists the 'not covered' areas (funding, liquidation, slippage, probability), which implicitly routes those needs elsewhere. It stops short of naming the specific alternative tools, so no full when-not-to-use mapping.

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.