Skip to main content
Glama
lkcair

yfinance-ai MCP server

by lkcair

compare_stocks

Read-onlyIdempotent

Compare stocks by key metrics: provide comma-separated ticker symbols to get a table of price, market cap, P/E, dividend yield, and returns.

Instructions

Compare key metrics across multiple stocks.

Args: tickers: Comma-separated list of ticker symbols (e.g., 'AAPL,MSFT,GOOGL')

Returns: Comparison table of price, market cap, P/E, dividend yield, and returns

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickersYes

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 covered. The description adds the list of compared metrics, but that overlaps with the existing output schema and adds no behavioral context such as rate limits, auth needs, or failure modes.

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 purpose, then clean Args/Returns sections and no filler. Slightly padded by the Returns block, which duplicates the output schema.

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?

With annotations covering safety and an output schema covering returns, the only substantive gap is routing versus sibling comparison tools. Parameter format is documented, so an agent has enough to call it 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?

Schema description coverage is 0% and the schema only exposes a bare string, so the description carries the burden. It compensates well by specifying the comma-separated format and giving a concrete example ('AAPL,MSFT,GOOGL'), which is exactly the missing semantics.

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 states a specific verb ('compare') and resource ('key metrics across multiple stocks'), and enumerates the compared fields. It does not, however, distinguish itself from close siblings like get_peer_comparison or get_historical_comparison, leaving an agent to guess which comparison tool applies.

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 explicit when-to-use or when-not-to-use guidance. Given siblings such as get_peer_comparison and get_historical_comparison, the absence of any routing advice 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.