Skip to main content
Glama

get_price_performance_windows

Identify the top outperformance and underperformance periods of a stock relative to a benchmark. This tool computes rolling returns and returns the largest non-overlapping windows, avoiding raw historical price parsing.

Instructions

Get compact benchmark-relative price-performance windows.

Use this for historical-coincidence evidence when a workflow needs 3-5 outperformance/underperformance periods. It fetches adjusted historical prices for the stock and benchmark, aligns common trading dates, computes rolling returns, and returns only the largest non-overlapping windows. This avoids raw historical-price CSV parsing for ordinary stock-move analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock symbol to analyze.
to_dateNoOptional end date (YYYY-MM-DD). Defaults to today.
directionNoboth, outperformance, or underperformance.both
from_dateNoOptional start date (YYYY-MM-DD). Defaults to lookback_years ago.
use_cacheNoWhether to use cached FMP data.
max_windowsNoMaximum windows to return (1-10).
window_daysNoCommon-trading-day window length for each return slice.
lookback_yearsNoDefault lookback when from_date is omitted.
benchmark_symbolNoBenchmark symbol for relative returns (default SPY).SPY

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations provided; description explains internal steps (fetch, align, compute, filter) but omits auth or rate limits, which are not critical for this read-only tool.

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?

Three concise sentences front-loading purpose, usage, and internal steps with no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Describes algorithm and output (non-overlapping windows); output schema exists, so additional detail is not needed.

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?

Schema coverage is 100%; description adds context on overall algorithm but not parameter-specific details beyond 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?

Description clearly states the tool fetches adjusted prices, aligns dates, computes rolling returns, and returns non-overlapping windows, distinguishing it from raw CSV parsing.

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?

Explicitly recommends use for historical-coincidence evidence needing 3-5 periods, but does not specify when not to use or compare to 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/henrysouchien/fmp-mcp'

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