Skip to main content
Glama
pairbook-io

pairbook-mcp

Official
by pairbook-io

Analyze a portfolio

analyze_portfolio
Read-onlyIdempotent

Analyze a portfolio of 2-30 US stocks or ETFs to reveal redundant positions, risk concentration, and true diversifiers. Returns volatility, beta, drawdown vs SPY, and ETF overlap warnings.

Instructions

Whole-portfolio risk and diversification analysis for 2 to 30 US stocks or ETFs: which positions are redundant, where the risk concentrates (Euler risk contributions), what actually diversifies, portfolio volatility, beta and market R2, diversification ratio, effective number of independent bets, correlation blocks that move together, max drawdown of the mix vs SPY, and issuer-sourced holdings-overlap warnings between the ETFs held. Use compare_pair for just two assets. Covers ~4,700 US-listed stocks and ETFs only (no crypto, no foreign listings, no inverse/leveraged short funds, no intraday data); figures use weekly closes and refresh once per trading day. Unknown tickers return an error: resolve them with resolve_symbol first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailNoauto (default) includes the correlation matrix up to 12 positions; compact never includes it
positionsYesThe holdings. Example: [{symbol:'AAPL',weight:40},{symbol:'MSFT',weight:30},{symbol:'SCHD',weight:30}]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYes
flagsYes
notesYes
termsNo
clustersYes
drawdownYes
portfolioYes
positionsYes
redundant_pairsYes
correlation_matrixNo
etf_overlap_warningsYes
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, but the description adds substantial behavioral context beyond those: weekly close frequency, once-per-trading-day refresh, no intraday data, coverage limits, holdings-overlap warnings, and error behavior for unknown tickers. It does not contradict the annotations.

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 dense but every clause carries information: scope, outputs, alternatives, exclusions, data cadence, limitations, and error handling. The key purpose is front-loaded, and the alternative routing appears mid-description in a natural place. No filler or repetition of schema details is present.

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 complex analysis tool with an output schema and safety annotations, the description covers everything needed to invoke it correctly: input constraints, supported asset types, data freshness, excluded instruments, error behavior, and sibling routing. It is complete enough that an agent can select and call this tool without further inference.

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?

The schema already has 100% description coverage for positions and detail, so the baseline is 3. The description adds context beyond the schema by clarifying the asset universe, position count range, and ticker-resolution requirement, which helps the agent choose valid parameter values. It does not need to repeat schema-level normalization rules, so a 4 is warranted.

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 names a specific verb and resource: whole-portfolio risk and diversification analysis for 2 to 30 US stocks or ETFs. It enumerates concrete outputs (Euler risk contributions, diversification ratio, effective number of bets, correlation blocks) and immediately distinguishes itself from the compare_pair sibling.

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?

The description explicitly says 'Use compare_pair for just two assets,' which is a direct alternative-routing instruction. It also gives exclusions (no crypto, no foreign listings, no inverse/leveraged funds) and tells the agent to resolve unknown tickers with resolve_symbol first, making when-to-use and when-not-to-use clear.

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/pairbook-io/pairbook-mcp'

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