Skip to main content
Glama

TradingCalc MCP — Crypto Futures Math

workflow.run_exit_target

Calculate the exact exit price needed to hit a target PnL or ROE percentage. Use when user asks "at what price do I take profit to make $500?" or "where should I set TP for 20% ROE?". Returns: targetExitPrice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes
leverageYesLeverage multiplier
sizeBaseYesPosition size in base asset
entryPriceYesEntry price
feeOpenPctNoOpening fee fraction, default 0.0002
targetModeYes"pnl" = target in USDT, "roe" = target in %
feeClosePctNoClosing fee fraction, default 0.0005
targetValueYesTarget value (USDT/coin for pnl mode, or %)
contractTypeNolinear = USDT-margined (default), inverse = coin-margined. For inverse, pnl-mode targetValue and outputs are in the base coin.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined (default), inverse = coin-margined. For inverse, pnl-mode targetValue and outputs are in the base coin.",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / targetValue / description
      Previous value: -"Target value (USDT or %)"New value: +"Target value (USDT/coin for pnl mode, or %)"
  2. Added

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of explaining behavior. It states that the tool returns targetExitPrice, but it does not mention formula assumptions, edge cases, or whether fees and leverage are incorporated in the calculation beyond what the schema hints at.

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?

The description is two sentences, front-loaded with the core purpose, and contains no filler or redundant information. It is concise while including useful examples.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description only says the return value is targetExitPrice. It does not explicitly describe output units or how contractType affects the result, though the parameter schema partially covers this. For a calculation tool with several inputs, a bit more context would improve completeness.

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 high and most parameters have descriptions. The description adds context by framing targetMode and targetValue around PnL and ROE, which helps clarify the intended meaning of those fields beyond the raw schema.

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?

The description clearly states the tool calculates the exact exit price needed to hit a target PnL or ROE percentage, which is a specific and actionable purpose. The usage examples make the intent easy to understand and naturally distinguish it from related planning tools.

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?

The description gives concrete usage examples for both PnL and ROE targets, which helps an agent decide when to invoke it. It does not explicitly mention when not to use it, but the examples are strong enough to imply the intended scope.

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.