Skip to main content
Glama

Hedgr FX Risk & Treasury

get_pnl_attribution

Read-only

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. Use to answer 'which currencies are hurting us?', 'what is our total FX impact this period?', or 'show me P&L by currency'. 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.

Input Schema

TableJSON 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

TableJSON 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/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 genuinely useful behavioral context beyond that: all amounts are in base currency, results are sorted by absolute total P&L, and the response carries Scout-aligned blocks that match what the in-app assistant quotes.

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 first sentences are front-loaded and efficient, but the final sentence is a dense run-on enumerating many output keys (dashboard_hero, totals.*, contributor families, materiality, fy_windows, provider_fx_ledger). Since an output schema exists, much of that enumeration restates structured data and bloats the definition.

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 4-param, read-only reporting tool with full schema coverage and an output schema, the definition gives enough to call it correctly, including currency basis and sort order. The return-value enumeration is somewhat redundant given the output schema, but nothing an agent needs to invoke it 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%, so entity_id, include_chart, include_realised and include_unrealised are already fully documented in the schema. The description adds no parameter syntax or format detail beyond that, 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+resource ('Returns FX P&L broken down by currency') and enumerates the distinct breakdowns it exposes: top contributor, unrealised MTM on open invoices, and realised gain/loss from settled invoices. This clearly separates it from exposure/guidance/hedge siblings without their schemas being opened.

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 explicit trigger questions ('which currencies are hurting us?', 'what is our total FX impact this period?', 'show me P&L by currency') that map cleanly onto when to reach for this tool. It stops short of naming an alternative tool or stating when NOT to use it, so it is strong context rather than a full 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.

Resources