Skip to main content
Glama

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

Breakeven Planning

workflow.run_breakeven_planning
Read-only

Calculate the break-even exit price that covers all trading fees: this alone, nothing else. Edge cases: entryPrice and sizeBase above zero; feeOpenPct and feeClosePct fractions from 0 to 0.05 (defaults 0.0002 and 0.0005). Fees only. Not covered: funding (use workflow.run_funding_breakeven), slippage and spread. Use when user asks only "what price do I need to just break even?" and nothing more. If the user also gave a stop/target or wants a full trade-safety check, use workflow.run_risk_reward or workflow.run_pre_trade_check instead; both already include this breakeven figure plus more. Returns: breakevenPrice, totalFees.

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>",
      "sizeBase": "<sizeBase>"
    },
    "name": "workflow.run_breakeven_planning"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYesTrade direction: "long" or "short"
sizeBaseYesPosition size: base asset qty for linear, USD contracts for inverse
entryPriceYesEntry price (positive)
feeOpenPctNoOpening fee fraction, default 0.0002
feeClosePctNoClosing fee fraction, default 0.0005
contractTypeNolinear = USDT-margined (default), inverse = coin-margined. For inverse, totalFees is returned 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 / sizeBase / description
      Previous value: -"Position size — base asset qty for linear, USD contracts for inverse"New value: +"Position size: base asset qty for linear, USD contracts for inverse"
  3. Changed2 schema fields changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined. For inverse, totalFees is returned in the base coin.",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / sizeBase / description
      Previous value: -"Position size in base asset"New value: +"Position size — base asset qty for linear, USD contracts for inverse"
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare a safe, closed-world read operation, and the description adds real behavioral context on top: fee-only accounting, the explicit exclusion of funding, slippage and spread, the accepted fee range with defaults, and the returned fields. The one gap is that it doesn't state whether the positivity/range constraints are validated with an error or silently clamped, which matters for a calculation agent.

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 purpose and scope come first, alternatives last, and the parenthetical defaults are compact. Some phrasing is staccato to the point of terse ("Fees only. Not covered: ..."), which reads efficiently but slightly fragments the flow; nothing is redundant with the name or title.

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?

There is no output schema, and the description compensates by naming the returned fields (breakevenPrice, totalFees) and by stating the domain boundary of the calculation. For a six-parameter, side-and-fee calculation tool, an agent has everything needed to call it correctly and to know when not to.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds a genuinely new constraint not present in the schema: feeOpenPct and feeClosePct must be fractions between 0 and 0.05, plus the requirement that entryPrice and sizeBase be above zero. It stops short of explaining how side and contractType change the fee math beyond what the schema already says.

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?

"Calculate the break-even exit price that covers all trading fees" is a specific verb plus resource, and the scope is nailed down with "this alone, nothing else." It explicitly separates itself from workflow.run_funding_breakeven, workflow.run_risk_reward, and workflow.run_pre_trade_check, so an agent can route 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 Guidelines5/5

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

It gives an explicit trigger phrase ("what price do I need to just break even?" and nothing more), explicit exclusions (stop/target, full trade-safety check), and names two concrete alternatives that already subsume this result. The when/when-not/alternative triad is fully covered.

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.