Skip to main content
Glama

compare_companies

Read-onlyIdempotent

Compare 2-5 companies side by side on key financial metrics (revenue, margins, net income, EPS, ROE / ROA, cash flow). Covers US and Nordic (HEL, STO) companies and can mix them. Figures are as reported (US GAAP / IFRS), never the companies' adjusted measures.

Args: companies: 2-5 names or tickers (first 5 used), e.g. ["NVDA", "AMD"]. years: Annual years per company (default 3). Annual mode only. period_type: "annual" (default, fiscal years), "quarterly" (one quarter per company) or "ltm" (trailing twelve months to each company's latest quarter: the fairest like-for-like view when fiscal years end in different months). year / quarter: Pin quarterly mode (quarter 1-4; setting it forces quarterly). Read as each company's own fiscal quarter, unless align="calendar". align: Quarterly mode. "calendar" (the default when no quarter is pinned) compares the fiscal quarters that fall in the same calendar quarter (Apple's fiscal Q3 to June with Microsoft's fiscal Q4 to June); "fiscal" takes each company's fiscal quarter as numbered. currency: ISO code (e.g. "USD") to convert every amount at ECB rates (period average for flows, period end for the balance sheet). Omit to keep each company's reporting currency.

Returns: companies[] with currency, latest_year (computed margins and ROE / ROA), latest_quarter, by_year, changes (per KPI: yoy_pct / cagr_pct for amounts, yoy_pp / change_pp for margins; quote them, never compute your own) and latest_price (latest stored close, typically T-1, with freshness fields; use get_stock_price for a live quote); plus kpis, not_found, no_data_for_period (resolved, but no data for that quarter) and computations (formulas; every margin and ratio is in percent, computed from the amounts shown). Each year carries _provenance: cite its citation_markdown URL as a numbered link next to those figures. Surface fiscal_calendar_warning (period_end dates more than 45 days apart) and data_quality_warnings, including mixed_currency_comparison: without currency figures are not converted, so state each currency or compare ratios.

Chart: per the server "Charts" guidance (a peer trend line needs 3+ annual periods; quarterly mode has nothing to chart); in ChatGPT call render_chart(source_tool="compare_companies", source_args=, output="python").

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "companies": "<companies>"
    },
    "name": "compare_companies"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearNo
alignNo
yearsNo
quarterNo
currencyNo
companiesYes
period_typeNoannual

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already establish read-only and idempotent behavior, but the description adds substantial operational context: figures are as reported under US GAAP/IFRS, never adjusted; currency conversion uses ECB rates; warnings include fiscal calendar gaps, data quality, and mixed-currency comparisons. It also explains provenance requirements and that changes should be quoted rather than recomputed.

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?

The definition is front-loaded with purpose and organized into Args, Returns and Chart sections, which makes the density manageable. It is long, and some return-value detail overlaps with the output schema, but most content is useful guidance for interpreting fiscal alignment, currencies and provenance.

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

Completeness5/5

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

Complete for a complex multi-company financial comparison tool: it covers scope, mode selection, parameter semantics, return interpretation, data-quality caveats, citation requirements and charting. The output schema exists, but the description still adds necessary interpretation guidance beyond it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 does so thoroughly. It documents every parameter: the 2-5 companies limit and first-five behavior, annual-only years, period_type values, quarterly pinning, align semantics, and currency conversion behavior.

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?

States a specific verb and resource: 'Compare 2-5 companies side by side on key financial metrics' and lists revenue, margins, net income, EPS, ROE/ROA and cash flow. It also distinguishes scope by naming US and Nordic (HEL, STO) coverage and the ability to mix them.

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?

Gives clear context for annual vs quarterly vs LTM modes, explains when LTM is the fairest comparison, and clarifies calendar vs fiscal alignment. It also names a concrete alternative for live pricing ('use get_stock_price for a live quote') and charting constraints, though it does not broadly position the tool against sibling financial-statement tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.