Skip to main content
Glama

EDGAR + Entity: US Company Research

Cross-company comparison (XBRL frames)

compare_companies
Read-onlyIdempotent

Compare one financial metric or XBRL concept across ALL reporting companies for a CALENDAR period (SEC frames API), e.g. rank by revenue for CY2024, or compare specific companies. Pass metric (revenue, gross_profit, operating_income, net_income, eps_basic, eps_diluted, operating_cash_flow, capex, total_assets, total_liabilities, stockholders_equity, cash, long_term_debt; aliases like sales, eps, assets) to fall back across the common tags for it (revenue: Revenues > RevenueFromContractWithCustomerExcludingAssessedTax > SalesRevenueNet), with the tag used per company; or pass tag for one exact concept. Period: CY2024 (annual duration), CY2024Q2 (quarter), CY2024Q4I (instant, for balance-sheet items; added automatically for balance-sheet metrics). Calendar basis: each filer's ~1-year (or ~3-month) period that best fits the calendar period, so CY2024 for Microsoft is its fiscal year ending 2024-06-30 (flagged fiscal_period_differs); use get_financials for fiscal years. accn is the latest filing reporting the value. Pass companies to filter to specific tickers/CIKs (exact or prefix names also work, without typo correction; unresolved items are listed in unresolved); otherwise returns the top limit by value.

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": {
      "period": "<period>"
    },
    "name": "compare_companies"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoExact XBRL tag, e.g. 'Revenues', 'NetIncomeLoss', 'Assets' (case-sensitive). Use instead of metric.
unitNoUSD (default), USD-per-shares, shares, pure. With metric, defaults to the metric's unit
limitNo
orderNodesc
metricNoNormalized metric with tag fallback, e.g. 'revenue', 'net_income', 'eps_diluted', 'total_assets'. Use instead of tag.
periodYesCY2024, CY2024Q3, or CY2024Q4I
taxonomyNoFor tag onlyus-gaap
companiesNoTickers or CIKs to include (default: all)

Output Schema

NameRequiredDescriptionDefault
unitNo
labelNo
periodYes
conceptNo
resultsYes
source_urlNo
missing_ciksNo
companies_reportingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / companies / items / maxLength
      Added value: +40
    • addedInput schema / properties / companies / items / minLength
      Added value: +1
    • addedInput schema / properties / metric
      Added value: +{
      +  "description": "Normalized metric with tag fallback, e.g. 'revenue', 'net_income', 'eps_diluted', 'total_assets'. Use instead of tag.",
      +  "enum": [
      +    "revenue",
      +    "gross_profit",
      +    "operating_income",
      +    "net_income",
      +    "eps_basic",
      +    "eps_diluted",
      +    "operating_cash_flow",
      +    "capex",
      +    "total_assets",
      +    "total_liabilities",
      +    "stockholders_equity",
      +    "cash",
      +    "long_term_debt",
      +    "revenues",
      +    "sales",
      +    "net_sales",
      +    "total_revenue",
      +    "turnover",
      +    "net_profit",
      +    "profit",
      +    "earnings",
      +    "net_earnings",
      +    "eps",
      +    "diluted_eps",
      +    "basic_eps",
      +    "operating_profit",
      +    "cfo",
      +    "cash_from_operations",
      +    "capital_expenditures",
      +    "assets",
      +    "liabilities",
      +    "equity",
      +    "shareholders_equity",
      +    "cash_and_equivalents",
      +    "debt"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / tag / description
      Previous value: -"e.g. 'Revenues', 'NetIncomeLoss', 'Assets'"New value: +"Exact XBRL tag, e.g. 'Revenues', 'NetIncomeLoss', 'Assets' (case-sensitive). Use instead of metric."
    • addedInput schema / properties / tag / pattern
      Added value: +"^([a-z-]+:)?[A-Za-z_][A-Za-z0-9_.-]*$"
    • addedInput schema / properties / taxonomy / description
      Added value: +"For tag only"
    • removedInput schema / properties / unit / default
      Removed value: -"USD"
    • changedInput schema / properties / unit / description
      Previous value: -"USD, USD-per-shares, shares, pure"New value: +"USD (default), USD-per-shares, shares, pure. With metric, defaults to the metric's unit"
    • changedInput schema / required
      Previous value: -[
      -  "tag",
      -  "period"
      -]New value: +[
      +  "period"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "companies_reporting": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "concept": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "label": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "missing_ciks": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "period": {
      +      "type": "string"
      +    },
      +    "results": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "accn": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "cik": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "end": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "loc": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "name": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "rank": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "start": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "val": {}
      +        },
      +        "required": [
      +          "val"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "source_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "unit": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "period",
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), so this is bonus context well beyond them: the calendar-basis quirk where CY2024 maps to Microsoft's FY ending 2024-06-30 and is flagged via fiscal_period_differs, which tag was resolved per company, that accn is the latest filing reporting the value, and that unresolved company names appear in `unresolved`. That is exactly the surprising behavior an agent needs before trusting results.

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?

Purpose and the sibling routing are front-loaded, and every clause carries information. It is a very dense single block, however; the long paren-enclosed lists make it harder to scan than a short bulleted structure would, so it is slightly less efficient than it could be.

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?

For an 8-parameter, enum-heavy, open-world tool, the description covers the decision-critical gaps: calendar vs fiscal basis, tag fallback resolution, filtering semantics, and the unresolved-items surface. With an output schema present, it correctly avoids restating return values.

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?

With 75% schema coverage the baseline is 3, but the description adds substantial meaning: the metric alias set and the concrete fallback precedence for revenue (Revenues > RevenueFromContractWithCustomerExcludingAssessedTax > SalesRevenueNet), the three period forms including auto-instant for balance-sheet metrics, and that company names accept prefixes without typo correction. It explains how metric and tag interact, which the schema alone does not.

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 opens with a specific verb and resource ('Compare one financial metric or XBRL concept across ALL reporting companies for a CALENDAR period') and immediately disambiguates from the closest sibling by naming get_financials for fiscal-year lookups. An agent can distinguish this from get_financials, get_xbrl_concept and search_company without opening any schema.

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

Usage Guidelines5/5

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

It gives explicit routing conditions: use this tool for calendar-period cross-company ranking, use get_financials for fiscal years, pass metric for fallback behavior vs tag for an exact concept, and pass companies to narrow the universe. Both the include-path and the default path (top `limit` by value) are stated, leaving nothing to inference.

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.