Skip to main content
Glama

Portfolio risk

portfolio_risk
Read-onlyIdempotent

Quantitative risk on the signed-in user's PRIMARY active portfolio by default (archived/deleted excluded): aggregate beta vs S&P 500, annualized volatility, 1-month 95% Value-at-Risk, each line's share of the portfolio's volatility (risk vs weight), the full correlation matrix with the groups of holdings that move together, the max drawdown of today's weights over the window and how long it took to recover, standard stress tests (S&P 500 −10%, the largest sectors −20%, the window's worst sessions replayed), per-holding beta/vol, currency exposure. Pass portfolio (a name, or 'all') only when the user asks for the others. Requires the user to be connected. Example: "how risky is my portfolio?", "which line carries the most risk?".

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_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
portfolioNoOptional: a portfolio name, or 'all' for every active portfolio. Defaults to the user's primary — only widen when the user explicitly asks.

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

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered elsewhere. The description adds real context beyond that: signed-in-user scoping, exclusion of archived/deleted portfolios, and a connection prerequisite. However, it repeatedly refers to 'the window' and 'the window's worst sessions' without ever defining the lookback length, which is a material behavioral ambiguity for a metrics tool.

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 core purpose and default scope are front-loaded in the first clause, followed by a long but informative metric enumeration, then the parameter caveat and examples. Every sentence contributes, though the metric list is a dense run-on that could be grouped for faster scanning.

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?

An output schema exists, so the description needn't explain the return shape, and the prerequisites (connected user) and default scope are stated. The undefined analysis window is the main missing piece for an agent to interpret results correctly.

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?

With one optional parameter at 100% schema description coverage, the schema already explains the name-or-'all' semantics and the primary default. The description restates the same guidance (pass only when the user asks for the others) without adding syntax, matching, or error behavior. Baseline 3 applies since the schema carries the load.

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+resource (quantitative risk on the primary portfolio) and enumerates the actual computed metrics: beta vs S&P 500, annualized volatility, 1-month 95% VaR, per-line risk contribution, correlation matrix, max drawdown and recovery, stress tests, per-holding beta/vol, currency exposure. It also states the default scope (primary active portfolio, archived/deleted excluded), which separates it from portfolio-wide siblings.

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?

It gives clear usage context: default to the primary portfolio, widen with the 'portfolio' parameter only when the user explicitly asks for the others, and requires the user to be connected. Two example phrasings anchor when to reach for it. It stops short of naming a concrete alternative tool (e.g., a performance or audit sibling) for overlapping questions, so it is not a full when/when-not/alternative statement.

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