Skip to main content
Glama
grahammccain

Chart Library

Explain Cohort

explain
Read-onlyIdempotent

Generate narrative and rankings from a stored stock cohort. Supports filter ranking, prose summary, position guidance, and risk ranking styles.

Instructions

Narrative + rankings derived from a stored cohort.

style values:
  - "filter_ranking"    — rank candidate filters by how much each
                          one shifts the distribution at the given
                          horizon. Use to discover conditional
                          structure before calling `cohort` with the
                          winning filter.
  - "prose"             — plain-English summary of the cohort
                          outcome (Claude Haiku).
  - "position_guidance" — exit-signal recommendation for an open
                          position. Derives symbol+entry_date from
                          the cohort anchor.
  - "risk_ranking"      — today's risk-adjusted picks (Sharpe-like)
                          from forward tests.

Args:
    cohort_id: handle from `search` or `cohort`
    style: see list above (default "filter_ranking")
    horizon: forward horizon in trading days (default 5)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cohort_idYes
styleNofilter_ranking
horizonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already indicate readOnly, nondestructive, idempotent, openWorld. The description adds rich behavioral details: explains each style's purpose, how filter_ranking works (ranking by distribution shift), prose style (plain-English summary), etc., going far beyond 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?

Front-loaded with a clear one-line summary, followed by a structured list of styles with concise explanations, then parameter details. No wasted words; every sentence adds value.

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 an explain tool with 3 parameters and an output schema (present but not shown), the description covers all necessary input semantics and behavioral context. It references sibling tool for one style, aiding contextual understanding.

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?

With 0% schema description coverage, the description fully compensates: explains `cohort_id` as a handle from search/cohort, `style` with a list of options and their meanings, `horizon` as forward trading days, and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Narrative + rankings derived from a stored cohort' and lists specific styles, establishing a specific verb+resource. It references sibling tool `cohort` for one style, but does not comprehensively distinguish from all siblings like analyze or cohort_analyze.

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?

Provides explicit guidance for each style, e.g., 'Use to discover conditional structure before calling `cohort` with the winning filter.' However, it lacks when-not-to-use guidance and clear differentiation from similar sibling tools.

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