Skip to main content
Glama
lkcair

yfinance-ai MCP server

by lkcair

get_peer_comparison

Read-onlyIdempotent

Compare a stock against sector peers or custom tickers on key financial metrics, returning a side-by-side table for quick analysis.

Instructions

Compare a stock with its peers on key metrics.

Args: ticker: Primary stock ticker symbol peers: Optional comma-separated peer tickers (if not provided, uses sector peers)

Returns: Comparison table of key metrics across stocks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
peersNo
tickerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds one useful behavior beyond that: the default fallback to sector peers when the peers argument is omitted. It says nothing about data freshness, limits on peer count, or latency, so it is a modest addition.

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?

Short and front-loaded, with the core purpose stated before the Args/Returns blocks. The Args block is slightly redundant as a format but the content is efficient. Nothing is padded.

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?

For a two-parameter read-only tool with an output schema, the description covers both parameters, the default behavior, and the return shape. The remaining gap is disambiguation from the sibling compare_stocks, which an agent needs but cannot get here.

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 meets it: ticker is defined as the primary stock ticker symbol, and peers is documented as an optional comma-separated list with its default fallback behavior. The only omission is format constraints such as a maximum number of peers.

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?

States a specific verb and resource: 'Compare a stock with its peers on key metrics.' An agent knows the operation and its scope. However, it does not distinguish itself from the sibling 'compare_stocks' or 'get_historical_comparison', leaving genuine ambiguity about 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?

No when-to-use or when-not-to-use guidance is given, and no alternative tools are named. The note that peers falls back to 'sector peers' when omitted is a behavior detail, not selection guidance. With near-identically named siblings like compare_stocks, the absence of routing guidance is a real gap.

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