Skip to main content
Glama
quanttrucker

portfolio-analytics-mcp

by quanttrucker

portfolio_beta

Calculate your portfolio's beta against a benchmark using daily returns. Get holding-level betas and data coverage to gauge market sensitivity.

Instructions

Compute the beta of a portfolio you supply against a benchmark.

Use this to answer how sensitive a set of holdings is to a market index — "what is my portfolio's beta to the S&P", "is this book more or less volatile than the market". Beta is estimated from daily returns over the lookback window.

You must pass the holdings in; this tool has no access to any brokerage account and cannot look up what someone owns. Weights need not sum to 1. Non-US listings need an exchange code to resolve the right venue.

Returns the portfolio beta, each holding's individual beta, and — importantly — the number of overlapping observations and the date range actually used, which is usually shorter than the range requested because of holidays and listing dates. A beta computed on very few observations comes back with a note saying so, and comes back as null rather than a misleading number when there are too few to estimate at all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holdingsYes
benchmarkNoSPY
lookback_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesLast date in the window used.
betaYesPortfolio beta, or null when too few overlapping observations exist.
noteNoSet when the result needs a caveat, e.g. a short window.
startYesFirst date in the window used (not requested).
benchmarkYes
per_holdingNoBeta of each holding against the benchmark.
observationsYesOverlapping daily observations actually used.
Behavior5/5

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

With no annotations provided, the description carries full burden and excels. It discloses that the tool cannot access brokerage accounts, that weights need not sum to 1, that non-US listings require an exchange code, and that returned observation counts/date ranges may be shorter than requested. It also details the null-and-note behavior for insufficient data.

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?

The description is efficiently structured in three distinct paragraphs: purpose/use-case, requirements/constraints, and return behavior/edge cases. Every sentence contributes substantive information; nothing is redundant or 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?

Given the tool's complexity and the presence of an output schema, the description is remarkably complete. It covers input requirements, methodology, return values (portfolio beta, individual betas, observations, date range), and edge-case handling (note and null when observations are too few) without needing to restate 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?

The input schema already provides detailed descriptions for all parameters (weights normalized, exchange needed for non-US, lookback_days default). The tool description adds brief context like 'beta is estimated from daily returns over the lookback window' but does not significantly expand beyond schema semantics. Schema coverage is high, so baseline 3 is appropriate.

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 a clear verb+resource statement: 'Compute the beta of a portfolio you supply against a benchmark.' It also gives concrete example questions ('what is my portfolio's beta to the S&P'), making the purpose unmistakable and distinct from sibling tools like sector_correlation and revalue_positions.

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?

The description explicitly says when to use it ('Use this to answer how sensitive a set of holdings is to a market index') and states a critical prerequisite ('You must pass the holdings in; this tool has no access to any brokerage account'). It does not name alternatives explicitly, but it clearly frames the tool for benchmark sensitivity analysis, which differentiates it from siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quanttrucker/portfolio-analytics-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server