Skip to main content
Glama
pairbook-io

pairbook-mcp

Official
by pairbook-io

Weekly return series

weekly_returns
Read-onlyIdempotent

Get weekly return series for US stocks and ETFs, aligned to common Fridays, for custom correlation and risk calculations. Covers ~4,700 US-listed tickers; resolve unknown symbols first.

Instructions

Weekly return series for one US stock or ETF (W-FRI, most recent last, all series end on the same Friday so tails align across symbols), for custom correlation or risk math. 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
weeksNoOnly return the most recent N weeks (default: all, up to 156)
symbolYesTicker, e.g. AAPL

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
docsNo
freqNo
as_ofYes
termsNo
symbolYes
returnsYes
window_weeksNo
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the description adds substantial behavioral context: W-FRI weekly closes, most recent last, aligned end Fridays, ~4,700 US-listed symbols only, exclusions, once-per-trading-day refresh, and error behavior for unknown tickers. No contradiction 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?

One dense paragraph with useful details front-loaded: series format and target use come first, coverage and refresh constraints follow. Slightly long but every clause conveys a distinct operational fact.

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 two-parameter tool with rich annotations and an output schema, the description covers the essential usage context: data scope, exclusions, refresh cadence, calendar alignment, and error handling. An agent has enough information to select and call the tool correctly.

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?

Input schema covers both parameters at 100%, and the description adds extra meaning beyond the schema: symbol domain restrictions (US-listed stocks/ETFs, no crypto/foreign/inverse funds), unknown-ticker error behavior, and the weekly cadence. This meaningfully supplements the schema's basic type descriptions.

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?

Clearly states the tool returns a weekly return series for one US stock or ETF, with an explicit purpose ('for custom correlation or risk math'). The single-symbol scope and series alignment details distinguish it from sibling tools like compare_pair, analyze_portfolio, and find_diversifiers.

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?

Names the intended use case ('custom correlation or risk math') and explicitly instructs users to resolve unknown tickers with resolve_symbol first. It does not enumerate when to choose this tool over every sibling, but the constraints and workflow guidance are 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