Skip to main content
Glama
lkcair

yfinance-ai MCP server

by lkcair

get_historical_comparison

Read-onlyIdempotent

Compare historical price performance across multiple stocks to calculate percentage returns for each ticker over a selected period.

Instructions

Compare historical price performance of multiple stocks.

Args: tickers: Comma or space-separated ticker symbols (e.g., 'AAPL,MSFT,GOOGL') period: Time period for comparison (default: 1y)

Returns: Performance comparison showing % returns for each ticker

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodNo1y
tickersYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnly=true, idempotent=true, destructive=false, and openWorld=true, so the safety profile is fully covered. The description only lightly reinforces behavior via the 'Returns % returns' line, which is largely redundant given the existing output schema. It adds little beyond the structured metadata.

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?

Front-loaded with the core action, then clean Args/Returns sections. The period default repeats the schema default and the Returns line restates what the output schema already provides, so a little redundancy creeps in, but nothing is bloated.

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

Completeness3/5

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

An output schema exists, so omitting return details is acceptable, and both parameters are explained. The real gap is disambiguation from sibling comparison tools, which the description does not address despite an otherwise crowded namespace.

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?

Schema description coverage is 0%, so the description carries the full burden and largely succeeds: it documents the tickers format (comma or space-separated with a concrete example) and the period default. It stops short of listing valid period values or their accepted units, which an agent guessing at input would want.

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?

Names a specific verb and resource ('Compare historical price performance of multiple stocks') that an agent can act on immediately. However, it does nothing to distinguish itself from close siblings like compare_stocks and get_peer_comparison, leaving the agent unable to tell which comparison tool to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance and no mention of alternatives, despite the crowded sibling set (compare_stocks, get_peer_comparison, get_historical_data). The agent gets no hint about when this tool is preferred over the others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.