Skip to main content
Glama

Hedgr FX Risk & Hedging

get_pnl_attribution

Read-only

Use this when the user asks how much their company gained or lost on currency moves, which currencies are hurting them, what their total FX impact is this period, or wants P&L by currency. Returns FX P&L broken down by currency with top contributor, unrealised mark-to-market (open invoices, booking rate vs current spot), and realised gain/loss from settled invoices where the accounting system provides it. Do not use for tax or accounting advice, or for live exchange rates. All amounts are in base currency. Sorts by absolute total P&L so the biggest contributors appear first. Also returns the Scout-aligned P&L family: dashboard_hero (the Monitor Total FX Impact exactly as the dashboard published it), totals.bank_pnl_base and totals.hedge_mtm_base, the four contributor families (top_unrealised_contributors, top_realised_contributors, bank_contributors, hedge_contributors), materiality (FX as % of profit and revenue, margin before/after FX on the operating basis only), fy_windows (realised by settlement date for the current FY, previous FY and all-time) and provider_fx_ledger. Every aligned block is the figure the in-app Scout assistant quotes.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_pnl_attribution"
  }
}

Input Schema

NameRequiredDescriptionDefault
entity_idNoFilter to a specific entity. Omit for consolidated group.
include_chartNoWhen true, the tool response includes an image/png content block containing a horizontal bar chart of P&L by currency (green = gain, red = loss). Uses the same data as the text response.
include_realisedNoInclude realised P&L from settled invoices where the accounting system provides the FX gain/loss. Default true.
include_unrealisedNoInclude unrealised P&L from open invoices (booking rate vs current spot). Default true.

Output Schema

NameRequiredDescriptionDefault
dataYesTool-specific payload. Null when connection_status.state is 'setup_required'.
connection_statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint=false, so safety is covered; the description goes well beyond that by disclosing currency normalisation ('All amounts are in base currency'), the sort order (absolute total P&L descending), the conditional PNG chart block, and that the aligned figures match what the in-app Scout assistant quotes. These are behavioral facts an agent cannot recover from the schema or annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening trigger sentence and the when-not clause are efficient and front-loaded, but the second half becomes a dense enumeration of return fields (dashboard_hero, totals.bank_pnl_base, the four contributor families, fy_windows, provider_fx_ledger) that largely duplicates the existing output schema. That material is informative but would be better consolidated rather than listed in prose.

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 read-only analytics tool the description covers purpose, trigger phrasing, exclusions, currency basis, sort order, and the shape of the returned breakdown, which is everything an agent needs to select and call it correctly. Return-value detail is partially redundant with the output schema, but nothing material 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 description coverage is 100%, including defaults for include_chart, include_realised and include_unrealised and the entity_id consolidation rule, so the schema carries the load. The description adds little parameter-specific meaning beyond restating that the chart uses the same data as the text response, 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?

The description names a specific verb and resource — FX P&L attribution broken down by currency — and enumerates the concrete outputs (unrealised mark-to-market on open invoices at booking rate vs spot, realised gain/loss from settled invoices). A front-line sentence of user trigger phrasings ('which currencies are hurting them', 'total FX impact this period') makes the tool's scope unambiguous without needing to open the 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?

Explicit when-to-use triggers are given (FX gain/loss questions, P&L by currency, period FX impact) plus a clear when-not clause ruling out tax/accounting advice and live exchange rates. The gap is that no alternative sibling is named for adjacent questions such as exposure or hedging, so the agent must infer routing from the sibling list itself.

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.

Resources