Skip to main content
Glama

compare_peers

Compare a stock against its peers using key financial ratios like valuation, profitability, and leverage. Auto-discover peers or provide tickers, and view summary or full comparison.

Instructions

Compare a stock against its peers on key financial ratios.

Fetches the peer group for a stock and builds a side-by-side comparison of financial ratios including valuation, profitability, margins, and leverage. By default, auto-discovery is operating-peer oriented. For dividend payout, buyback, and shareholder-return questions, pass peer_context="capital_allocation" or metric="dividend_payout" so the peer set favors mature dividend-paying capital-allocation comps over no-dividend growth operating peers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of peers to include (default: 5, max: 10).
peersNoOptional comma-separated peer tickers (e.g., "MSFT,GOOGL,META"). If not provided, peers are auto-discovered via FMP.
formatNoOutput format: - "summary": Comparison table with key metrics (P/E, P/B, P/S, ROE, ROA, gross/operating/net margin, debt/equity, current ratio, dividend yield, PEG ratio) - "full": All TTM ratios for each peer (60+ metrics)summary
metricNoOptional metric hint used to infer peer_context.
symbolYesStock symbol to compare (e.g., "AAPL", "MSFT").
fiscal_yearNoOptional fiscal year for supported annual metric comparisons. For "FY24", pass 2024. Currently supports metric="dividend_payout_ratio".
peer_contextNoOptional peer-selection context. Use "capital_allocation" for payout ratio, dividend, buyback, or shareholder-return metrics.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description must fully disclose behavior. It describes that the tool fetches peer groups (auto-discovery) and builds a side-by-side comparison, and notes the default operating-peer orientation. However, it omits details about whether it mutates data, required permissions, rate limits, or side effects, which given the absence of annotations, leaves some gaps.

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?

The description is concise (7 sentences) and well-structured: it opens with the primary purpose, then details the output, and ends with specific usage guidelines. Every sentence adds value, and the critical information (purpose and key usage notes) is front-loaded.

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?

Given the tool's complexity (7 parameters), the presence of an output schema, and no annotations, the description covers the main behavior (peer comparison, ratio types) and provides specific usage guidance for edge cases (dividend/buyback). It might miss explaining the output format beyond the summary/full distinction, but the output schema likely handles that. Overall, it is sufficiently complete.

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 coverage is 100% (all 7 parameters described in schema), but the description adds valuable context beyond what the schema provides. For example, it explains that peer_context='capital_allocation' favors mature dividend-paying comps and that metric hints can infer peer_context. This extra guidance helps agents use parameters correctly.

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?

The description starts with a clear verb-resource pair: 'Compare a stock against its peers on key financial ratios.' It specifies the action (compare), the object (stock against peers), and the content (financial ratios including valuation, profitability, margins, leverage). This distinguishes it from sibling tools like fmp_profile (single stock) or get_market_context (broader market).

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?

The description provides specific guidance on when to use the peer_context='capital_allocation' or metric='dividend_payout' for dividend/buyback questions, and notes that default auto-discovery is operating-peer oriented. While it gives clear context, it does not explicitly state when not to use this tool or name alternatives among 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