Skip to main content
Glama

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

Forex PnL

workflow.run_forex_pnl
Read-only

Profit or loss for a closed or hypothetical forex trade, in pips and in the pair's own quote currency, long or short. Use when user asks "what did I make/lose on this trade?" or "what would X pips be worth on Y lots?". Returns: pips (signed, positive favors the position taken), pnlQuote.

Input Schema

NameRequiredDescriptionDefault
pairYesCurrency pair in BASE/QUOTE format, e.g. "EUR/USD"
sideYesTrade direction: "long" or "short"
unitsYesPosition size in base-currency units
exitPriceYesExit price, same quote convention as the entry price
entryPriceYesEntry price in the pair's own quote terms, e.g. 1.0850 for EUR/USD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / entryPrice / description
      Added value: +"Entry price in the pair's own quote terms, e.g. 1.0850 for EUR/USD"
    • addedInput schema / properties / exitPrice / description
      Added value: +"Exit price, same quote convention as the entry price"
    • addedInput schema / properties / side / description
      Added value: +"Trade direction: \"long\" or \"short\""
  2. Added

TDQS

A4.2/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 behavior the annotations cannot: that it works for both closed and hypothetical trades, and that the returned pips figure is signed with positive favoring the position taken. No output schema exists, so this return-value disclosure is the main carrier of behavior.

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 dense sentences: purpose and scope first, then trigger phrasings, then the return contract. Every clause carries information and nothing is repeated from the 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 pure computation tool with full annotation coverage the description is nearly complete, and it compensates for the absent output schema by naming the two return fields and the sign convention. Only minor edge cases (JPY-style pairs, pip definition per pair) are left implicit, which is acceptable given the schema's price-convention notes.

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% across all five parameters, so entry/exit price conventions, side enum and units are already fully documented structurally. The description reinforces the quote-currency convention and the long/short choice, but adds no syntax or constraint beyond the schema, so the baseline 3 applies.

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 (compute profit or loss) and a specific resource (a closed or hypothetical forex trade), and scopes it as pips plus the pair's own quote currency for long or short positions. That is enough to separate it from siblings such as run_forex_pip_value, run_forex_risk_reward and run_pnl_planning without opening any schema.

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?

Gives concrete user phrasings that select this tool ("what did I make/lose on this trade?", "what would X pips be worth on Y lots?"), which is strong situational guidance. It stops short of naming an alternative or an exclusion, so it is clear context rather than a full when/when-not routing rule.

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.