Skip to main content
Glama

PoliErgaleio

analyze_portfolio

Analyses an investment portfolio from its transaction history: net invested capital, current value, absolute return, chain-linked time-weighted return (TWR), CAGR on initial invested capital, per-sub-portfolio breakdown and allocation shares, with multi-currency support via per-transaction FX rates. Use to analyze actual portfolio ledgers or current holdings and valuation data. Require real transactions/holdings and a current valuation for each holding; require FX rates where currencies differ. TWR needs a valuation immediately before each later external cash flow and at the end date; report null with its reason when absent. Equal and opposite same-day movements between sleeves in the base currency net to an internal transfer for combined TWR; confirm both legs before using that treatment. Missing acquisition cost may use the disclosed performance-from-today behavior. Never create transactions or holdings records.

Input Schema

NameRequiredDescriptionDefault
asOfDateNoOptional ISO date (YYYY-MM-DD) used as the CAGR end date. Defaults to today.
baseCurrencyYesReporting currency (e.g. EUR). Transactions in another currency require fxRate.
portfolioNameNoOptional label for the portfolio.
subPortfoliosYesOne entry per account, broker or strategy sleeve.

Output Schema

NameRequiredDescriptionDefault
cagrNo
seriesNo
totalGainNo
assumptionsNo
baseCurrencyNo
currentValueNo
portfolioNameNo
subPortfoliosNo
totalInvestedNo
absoluteReturnNo
firstDepositDateNo
timeWeightedReturnNo
totalInitialInvestedNo
twrUnavailableReasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so: it states the read-only boundary ('Never create transactions or holdings records'), defines the null-and-reason behavior when pre-flow valuations are absent, explains internal-transfer netting for combined TWR and the requirement to confirm both legs, and discloses the 'performance-from-today' fallback when acquisition cost is missing. These are non-obvious edge-case behaviors an agent could not infer from the schema.

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

Conciseness4/5

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

Front-loaded with the purpose and output list, then prerequisites, then edge cases — a sensible ordering. The middle-to-end sentences are dense run-ons stacking several conditional behaviors, which costs some scanability, but almost no content is redundant.

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 complex multi-sleeve calculation tool, the description covers inputs, prerequisites, and the trickiest modeling decisions, and an output schema exists so return values needn't be spelled out. A minor remaining gap is the absence of any note on failure modes or partial results beyond the TWR-null case.

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 description coverage is 100%, so baseline is 3; the description earns above that by tying FX rates to per-transaction granularity and explaining that TWR requires a valuation immediately before each later external cash flow and at the end date — semantics the 'Value' enum and valuation items alone don't convey. It does not further clarify asOfDate or baseCurrency beyond the 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?

States a specific verb and resource ('Analyses an investment portfolio from its transaction history') and then enumerates the exact outputs: net invested capital, current value, absolute return, TWR, CAGR, per-sub-portfolio breakdown and allocation shares. This is clearly distinguishable from siblings like parse_portfolio_csv or compare_investment_vehicles, which parse or compare rather than compute portfolio performance metrics.

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 an explicit applicability condition: 'Use to analyze actual portfolio ledgers or current holdings and valuation data,' and follows with prerequisites (real transactions/holdings, a current valuation per holding, FX rates where currencies differ). What it lacks is sibling routing — it never says to use parse_portfolio_csv first to obtain the ledger, or that compare_investment_vehicles handles cross-vehicle comparison.

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