Skip to main content
Glama

What-if on my portfolio

simulate_changes
Read-onlyIdempotent

What-if on the signed-in user's portfolio (PRIMARY by default): the user names target weights for some holdings — 0 takes one out, a new ticker comes in — and the other holdings keep their proportions in what is left. Shows beta, volatility, 1-month VaR, concentration, the largest line and the sector weights before and after. Simulates only the changes named, never proposes any; past prices, not a forecast. Free. Requires the user to be connected. Example: "what if NVDA were 10% and I had no TSLA?" → changes [{ticker:'NVDA', target_weight_pct:10}, {ticker:'TSLA', target_weight_pct:0}].

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "changes": "<changes>"
    },
    "name": "simulate_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
changesYesTarget weights, in percent of the portfolio.
portfolioNoOptional: a portfolio name, or 'all'. Defaults to the primary portfolio.

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.6/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent and non-destructive, and the description adds real behavioral context beyond them: the operation is free, requires the user to be connected, only reflects the changes the user names, and is based on past prices rather than a forecast. Those constraints (auth requirement, cost, non-prescriptive semantics) are exactly what an agent needs before invoking 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 core purpose and default portfolio are front-loaded, followed by output contents, behavioral caveats, and a concrete example. It is dense and reads as a long run-on paragraph, but each clause carries information and there is no filler.

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 two-parameter read-only simulation tool with an output schema, this covers everything an agent needs: what it computes, what the parameters mean, the default portfolio, the auth requirement, and the limits of the result. Return-value explanation is not required given the output schema, and the description stays within that boundary.

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 earns more by explaining what the target weight values mean in practice: 0 takes a holding out, a new ticker brings one in, and remaining holdings are re-proportioned in what is left. The worked example maps the natural-language request to the exact changes array, adding semantic meaning the raw schema does not convey.

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 operation (what-if simulation on the signed-in user's portfolio) and immediately scopes it: target weights on named holdings, 0 removes a holding, a new ticker adds one, and untouched holdings keep their relative proportions. It also lists the outputs (beta, volatility, 1-month VaR, concentration, largest line, sector weights), so an agent can tell this apart from portfolio_risk or portfolio_performance without opening a 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?

Clear usage context is given: use it when the user poses a hypothetical ('what if NVDA were 10% and I had no TSLA?'), it simulates only the named changes and never proposes recommendations, and it is backward-looking rather than a forecast. The gap is that no alternative tool is named for adjacent needs (e.g., actual risk analysis or a recommended allocation), so the agent must infer when to route elsewhere.

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