Skip to main content
Glama

Portfolio performance

portfolio_performance
Read-onlyIdempotent

The signed-in user's PRIMARY active portfolio performance by default (archived/deleted excluded): invested cost, current value, total P&L (unrealized + realized), cost-basis return %, time-weighted return vs a benchmark (S&P 500 by default; Nasdaq 100, MSCI World, STOXX 600, Euro Stoxx 50, CAC 40, or a weighted mix), the deepest drop since tracking began and how long it took to recover (deposits and withdrawals taken out), daily equity curve. Use for 'how is my portfolio doing', 'my returns', 'vs the market', 'P&L'. Pass portfolio (a name, or 'all') only when the user asks for the others. Requires the user to be connected. Example: "how did my portfolio do vs the MSCI World?" → benchmark msci_world.

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": "portfolio_performance"
  }
}

Input Schema

NameRequiredDescriptionDefault
benchmarkNoBenchmark to compare with (default sp500). Index proxies: SPY, QQQ, URTH, VGK, FEZ, EWQ.
portfolioNoOptional: a portfolio name, or 'all' for every active portfolio. Defaults to the user's primary — only widen when the user explicitly asks.
benchmark_mixNoA blended benchmark instead, e.g. [{benchmark:'sp500', weight:60}, {benchmark:'stoxx600', weight:40}].

Output Schema

NameRequiredDescriptionDefault
okYesfalse on an error; then `error` says what happened and what to do.
cardNoThe in-chat InvestIQ card, in English and French.
dataNoThe tool's own result fields.
toolYes
as_ofYesISO time the data was computed (a stored analysis: when it was computed).
errorNo
linksNoInvestIQ pages for this result.
degradedNotrue when part of the data was missing.
viz_specNoThe recommended chart's series (data only).
disclaimerYes
data_qualityNoWhat was requested, what was used, and why anything was left out.

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?

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, yet the description still adds real behavioral context: archived and deleted portfolios are excluded, the user must be connected, drawdown is computed with deposits and withdrawals removed, and benchmark defaults are enumerated with the alternative weighted-mix mode. That goes meaningfully beyond the structured metadata rather than restating it.

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?

The content is front-loaded with scope and defaults before the metric list, and the usage triggers and example come last where an agent will look for them. The opening sentence is a long run-on that stacks every returned metric, which is dense but each item is substantive. Minor trimming of the metric enumeration would improve scanability without losing information.

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 3-parameter, zero-required read tool with full schema coverage, existing annotations and an output schema, the description covers everything an agent needs: scope defaults, exclusion rules, prerequisites, benchmark choices and a disambiguation example. No critical decision point is left undocumented.

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 coverage is 100%, so the baseline is 3, but the description adds selection semantics the schema cannot express: 'portfolio' defaults to the primary and should be widened only on explicit request, and 'benchmark' defaults to sp500 while 'benchmark_mix' enables a blend. The closing example concretely maps 'vs the MSCI World' to benchmark=msci_world, which reduces invocation error.

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?

The description uses a specific verb+resource framing and enumerates exactly what is returned: invested cost, current value, total P&L, cost-basis return %, time-weighted return vs a benchmark, max drawdown with recovery time, and daily equity curve. It also fixes the default scope (the signed-in user's PRIMARY active portfolio, archived/deleted excluded), which an agent can act on without opening the schema. It stops short of naming close siblings such as portfolio_risk or sector_performance, so the differentiation from those is left implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing triggers are given ('how is my portfolio doing', 'my returns', 'vs the market', 'P&L'), and the description supplies a negative instruction for the portfolio parameter: only widen to a name or 'all' when the user asks for others. It also states a prerequisite (the user must be connected) and closes with a worked natural-language-to-parameter mapping example.

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