Skip to main content
Glama

Compare portfolios side by side

compare_portfolios
Read-onlyIdempotent

Two to eight separate portfolios measured over one shared window of price history: growth, volatility, worst fall, and how each moved against the others. Use it for separate portfolios; for a before-and-after of one portfolio, test_a_change. Give each portfolio a short label so the answer can refer to it; base sets the one currency all are measured in (default USD). Says what each was; does not say which to hold.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoCurrency every figure is expressed in (USD, EUR, GBP, CAD…). Default USD.
portfoliosYesTwo to eight portfolios, {label: {ticker: weight}}. Labels are shortened to letters and digits.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoShared window end.
dataNoWhere the prices came from and what was missing or repaired.
startNoShared window start.
_fenceYesWhat these figures are and are not: descriptive, no forecast, no advice. Repeat its sense when presenting the result.
seriesNoPer portfolio label: the growth path over the window.
metricsNoPer portfolio label: growth, volatility, worst fall and related figures.
correlationNoPer pair of labels: how the portfolios moved together.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description adds real value beyond that: the 2-8 cardinality, the single shared window, and a scope boundary ("Says what each was; does not say which to hold") that tells the agent the tool won't give advice. It stops short of stating return shape, but an output schema exists.

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 metrics and scope, then disambiguation, then parameter tips. Every sentence earns its place, though the clipped fragments ("Says what each was; does not say which to hold") trade readability for density.

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?

With annotations carrying safety, an output schema covering returns, and 100% schema coverage for params, the description need only cover scope and routing — which it does. The only thin spot is the co-movement metric ("how each moved against the others"), which is left slightly vague but is likely resolved by the output schema.

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 both parameters are already well documented there, including the label-shortening rule and the base-currency default. The description largely restates that ("base sets the one currency... default USD"), adding only the hint that labels are referenced in the answer. Baseline 3 is appropriate when the schema does the heavy lifting.

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+resource (compare separate portfolios) plus the scope (two to eight, one shared price window) and the metrics returned (growth, volatility, worst fall, co-movement). It explicitly distinguishes itself from the sibling test_a_change, so an agent can route without opening either schema.

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?

"Use it for separate portfolios; for a before-and-after of one portfolio, test_a_change" names the alternative and the exact condition that selects it. Nothing about when-not-to-use is left to inference.

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