Skip to main content
Glama
grahammccain

Chart Library

Portfolio Analysis

portfolio
Read-onlyIdempotent

Compute multi-holding conditional distribution to rank risk contributors, or retrieve per-symbol track record and Layer 5 memory for pattern intelligence.

Instructions

Portfolio-level analysis OR per-symbol track-record + Layer 5 memory.

Two modes:

  mode="basic" (default):
    Multi-holding conditional distribution. Runs per-holding cohorts
    in parallel, weight-averages the distributions, ranks tail
    contributors (weight × p10, most negative first). PM-agent
    primitive. Pass holdings=[{symbol, weight, date}].

  mode="symbol_intel":
    Per-symbol track record + Layer 5 memory — what does Chart
    Library know about this single symbol across all prior
    analyses? Returns prior cohort_observations, feature_reliability
    learned for the symbol, and the symbol's per-pattern accuracy
    history. Pass symbol=X, lookback_days=N.

Args:
    holdings: list of {symbol, weight, date} (mode="basic")
    symbol: ticker (mode="symbol_intel")
    mode: "basic" | "symbol_intel"
    horizons: forward horizons (mode="basic"; default [5, 10])
    top_k_per_holding: cohort size per holding (mode="basic")
    include_path_stats: include MAE/MFE (mode="basic"; slower)
    lookback_days: history window (mode="symbol_intel"; default 365)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holdingsNo
symbolNo
modeNobasic
horizonsNo
top_k_per_holdingNo
include_path_statsNo
lookback_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, which indicate safe, non-destructive, repeatable behavior. The description adds significant behavioral details: basic mode runs per-holding cohorts in parallel, weight-averages distributions, and ranks tail contributors; symbol_intel returns prior observations, feature reliability, and accuracy history. It also notes that include_path_stats makes it slower. No contradictions with annotations.

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?

The description is well-structured with clear sections for modes, bullet points for arguments, and front-loaded purpose. However, it is somewhat verbose, especially the argument list which could be streamlined. Still, every sentence adds value and the structure aids readability.

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 7 parameters with 0% schema coverage, the description provides complete coverage of all inputs. Output schema exists (not shown), but the description clearly states what each mode returns. The tool has moderate complexity, and the description is fully adequate for an agent to select and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description fully compensates. It explains each parameter: holdings (list of dicts for basic mode), symbol (for symbol_intel), mode (basic/symbol_intel), horizons (forward horizons for basic), top_k_per_holding (cohort size), include_path_stats (enables MAE/MFE, slower), and lookback_days (history window). It specifies which parameters apply to which mode, adding meaning beyond the schema.

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 clearly states two distinct modes with specific purposes: 'Portfolio-level analysis' for basic mode and 'per-symbol track-record + Layer 5 memory' for symbol_intel. It uses a specific verb-resource combination, and the two modes are easily differentiated, helping the agent select the correct mode. It also distinguishes itself from sibling tools like 'cohort' or 'symbol_intelligence' by combining both concepts.

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 provides explicit usage context for each mode: basic is a 'PM-agent primitive' for multi-holding distributions, and symbol_intel is for per-symbol memory. However, it does not explicitly state when not to use the tool or compare it to alternatives like 'cohort' or 'symbol_intelligence'. It gives clear context but lacks exclusions.

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/grahammccain/chart-library-mcp'

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