Skip to main content
Glama

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

Exit Target

workflow.run_exit_target
Read-only

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

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds only the return field, and does not disclose fee-handling behavior (feeOpenPct/feeClosePct defaults) that meaningfully affects results. Adequate but not rich context.

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?

Three tight sentences: purpose first, usage examples second, return value last. Zero waste; every sentence earns its place, and the return declaration compensates for the missing output schema.

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 9-param calculation tool with no output schema, the description covers purpose, triggering conditions, and the returned field, while annotations carry safety and the schema carries parameters. Only nuanced behavior (fee effects on the result) is unaddressed.

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 89%, so the schema already documents nearly all parameters, including the targetMode and contractType enums and fee defaults. The description adds no syntax or semantic detail beyond what the schema provides; baseline 3 applies.

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?

States a precise verb+resource: 'Calculate the exact exit price needed to hit a target PnL or ROE percentage.' This is clearly distinct in intent from breakeven/scale-out siblings, but no sibling is named explicitly to route the agent.

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?

Provides concrete user-question triggers ('at what price do I take profit to make $500?', 'where should I set TP for 20% ROE?'), which clearly signal when to use it. No when-not guidance or named alternatives (e.g. breakeven planning) are given.

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.