Skip to main content
Glama

pyeconomics

Mean-variance portfolios

portfolio_mean_variance
Read-onlyIdempotent

Portfolio expected return and risk, the minimum-variance frontier with short sales, and the minimum-variance and tangency portfolios. Runs Mean-variance portfolios (portfolio.mean_variance, version 1) on the given inputs and returns its canonical result: the validated inputs, the outputs, the warnings and the manifest. The required calculation field selects one of: frontier, minimum_variance, portfolio, tangency. Every number carries its unit in the input schema; rates are decimals.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world, and non-destructive behavior, so the description only needs to add context. It does: the result envelope is the validated inputs, outputs, warnings and manifest, short sales are allowed in the frontier, and rates are decimals. It does not mention error behavior or input-validation failures beyond the warnings field.

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?

Three sentences, front-loaded with what the tool computes before the boilerplate 'runs ... returns its canonical result' framing. The mode list and unit note are compact; the canonical-result sentence is somewhat template-like but still carries the return envelope.

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 return values need not be detailed, and the description still summarizes the envelope. For a four-mode financial model with fully documented parameters, the only real gap is the absence of cross-tool guidance and any statement about the covariance vs volatilities/correlations alternative, which the schema covers instead.

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%, so the baseline is 3; every field already has a description and unit annotation. The description's note that every number carries its unit in the schema and that rates are decimals adds modest cross-cutting clarity, but the mode enumeration largely restates the schema discriminator.

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 opens with the specific resource (portfolio expected return and risk, minimum-variance frontier, minimum-variance and tangency portfolios) and names the model identifier with version. It enumerates the four calculation modes so an agent can map an intent to this tool without opening the schema.

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

Usage Guidelines3/5

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

It explains how to pick a mode via the calculation field (frontier, minimum_variance, portfolio, tangency), which is in-tool routing rather than cross-tool guidance. Nothing states when to use this instead of siblings such as risk_value_at_risk or performance_risk_adjusted, nor any preconditions such as needing a covariance matrix or volatilities-plus-correlations.

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.