Skip to main content
Glama

crashtestyourstrategy

Portfolio compare (paired Revise-step comparison)

portfolio_compare
Read-onlyIdempotent

USE WHEN you revised a portfolio and want to know whether the revision made the tail better or worse. Compares A (reference) with B (candidate) on IDENTICAL simulated paths, so every delta is attributable to the weights, not seed noise. Returns drawdown-distribution deltas, probability-weighted scenario summaries, per-scenario deltas, the risk-concentration shift and which diversification failures B introduces or resolves. revision_required flags a B that deepens the worst-path drawdown or adds a failure. Provide holdings_a and holdings_b as [{asset, weight}]. Descriptive, not advisory; neither portfolio is ranked.

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": {
      "holdings_a": "<holdings_a>",
      "holdings_b": "<holdings_b>"
    },
    "name": "portfolio_compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
holdings_aYesReference portfolio A. Portfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Assets: SPY, TLT, GOLD, BTC (aliases GLD, BTC-USD). Weights are non-negative and normalised to sum to 1; at most 50 legs, no duplicates.
holdings_bYesCandidate revision B, same shape — evaluated on paths identical to A's, so every delta is attributable to the weights.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / holdings_a / description
      Previous value: -"Reference portfolio A. Portfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Weights are normalised to sum to 1; assets must be in the substrate universe."New value: +"Reference portfolio A. Portfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Assets: SPY, TLT, GOLD, BTC (aliases GLD, BTC-USD). Weights are non-negative and normalised to sum to 1; at most 50 legs, no duplicates."
  2. Changed2 schema fields changed
    • addedInput schema / properties / holdings_a / description
      Added value: +"Reference portfolio A. Portfolio legs: list of {asset, weight} objects, e.g. [{'asset': 'SPY', 'weight': 0.6}, {'asset': 'TLT', 'weight': 0.4}]. Weights are normalised to sum to 1; assets must be in the substrate universe."
    • addedInput schema / properties / holdings_b / description
      Added value: +"Candidate revision B, same shape — evaluated on paths identical to A's, so every delta is attributable to the weights."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the key methodological behavior (common simulated paths so deltas are attributable to weights, not seed noise), the shape of the return payload, the meaning of revision_required, and the neutrality stance ('descriptive, not advisory; neither portfolio is ranked').

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

Conciseness5/5

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

Front-loaded with a USE WHEN trigger, then method, then output contents, then the decision flag. Dense but every sentence carries distinct information; nothing is repeated verbatim from the schema.

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-portfolio paired-simulation tool with an output schema and full annotation coverage, the description supplies everything needed to call it correctly: trigger, method, input shape, and how to interpret the revision_required signal.

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 coverage is 100% and the schema already documents leg shape, allowed assets, aliases, weight normalisation and the 50-leg cap. The description restates the [{asset, weight}] format and clarifies the A/B roles, which adds a little meaning but largely duplicates structured data – baseline 3.

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 ('Compares A (reference) with B (candidate)') and the paired-revision scope makes it unmistakable next to build_portfolio or single-portfolio stress tools. The purpose is reinforced by naming what is compared and on what basis (identical simulated paths).

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?

'USE WHEN you revised a portfolio and want to know whether the revision made the tail better or worse' gives a clear, actionable trigger. It stops short of the top mark because it names no alternative sibling or explicit when-not condition.

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.