Skip to main content
Glama

MetricDuck — Financial Analysis

Raw XBRL Facts

get_xbrl_facts
Read-only

Use this when the user asks for a number the standard statements don't break out — revenue by segment, geography, product or customer, customer concentration, an industry metric (medical cost ratio, reserve replacement ratio) — or a figure exactly as filed in a 10-K / 10-Q. Searches the raw XBRL facts (~3,000 per filing, with dimensional breakdowns); for standard statements and the 250+ standard metrics, get_financials is faster.

  • Breakdowns exist only where the filer tags them (usually revenue + segment profit / Adjusted EBITDA).

  • Revenue concentration / share by customer, channel, distributor, geography or product: search concentration (as-filed ConcentrationRiskPercentage, present even when the prose is qualitative).

  • A past filing: the default is the latest filing as of TODAY; pin accession_number or fiscal_year/fiscal_period.

  • A standalone quarter from a cumulative YTD line: period_history: true (recipe on that parameter).

Sign — read before quoting a direction. The value column of <raw_data> rows is the raw as-filed value: a positive magnitude for outflow / contra-asset concepts (PaymentsTo…, capex, accumulated depreciation) but signed by construction for the IncreaseDecreaseIn… working-capital family. Where a negative value carries the negated-label role, the table shows the filed face instead. (filed −) is a per-concept hint, not a guarantee: it fires wherever the filing presents that concept negatively anywhere (e.g. TXN's tax provision, whose face reads 709). When direction is load-bearing, check the edgar fact link or use get_financials (a curated statement-sign map).

Share counts: the dei EntityCommonStockSharesOutstanding ("cover-page / current", as of the filing date) is for market cap and equity value; the us-gaap CommonStockSharesOutstanding is the balance-sheet period-end count; WeightedAverageNumberOf…SharesOutstanding is the per-period EPS average. They can differ a few % — match the Period column to your task.

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": {
      "ticker": "<ticker>",
      "search": "<search>"
    },
    "name": "get_xbrl_facts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum facts to return (default 50, max 200)
searchYesSearch XBRL concepts by label or name. SPACES INSIDE A TERM ARE 'AND' — every word must appear somewhere in the fact's concept name, label, OR its dimension axis/member labels AS THE FILER WROTE THEM. Commas are OR ('goodwill,impairment'). So adding a category word to narrow a search can silently DROP the series you want: the filer may name the axis something else entirely (AutoNation tags reporting-unit goodwill on 'Goodwill Reporting Units', so 'goodwill segment' eliminates it while 'goodwill' finds it). PREFER ONE WORD and filter the results yourself; widen if a multi-word search returns suspiciously few facts. Examples: 'goodwill', 'medical cost ratio', 'goodwill,impairment', 'concentration' (revenue share by customer / channel / distributor / geography / product).
tickerYesCompany ticker symbol (e.g., 'UNH', 'AAPL'). Must be exact.
form_typeNoFiling type when auto-resolving (ignored if accession_number provided). Default: 10-K (annual). FPI filers: 20-F/40-F (annual) or 6-K (interim) — the backend auto-resolves the right form family, so the default also serves FPIs.10-K
fiscal_yearNoFiscal year to look up (e.g., 2022). If omitted, uses the latest filing. Ignored if accession_number provided.
fiscal_periodNoPin the exact period when resolving by fiscal_year (Q1/Q2/Q3/Q4/FY). WITHOUT it, fiscal_year resolves to the LATEST filing of that year — wrong for 'as of <quarter>' questions (use this to get the right quarter's balance/figure). Ignored if accession_number or period_history is set. (For a concept's value across ALL periods at once, use period_history instead.)
period_historyNoReturn the searched concept's full as-filed series ACROSS filings (every period: quarter, 6-month YTD, 9-month YTD, FY) instead of one filing's facts. Use this to de-cumulate a cumulative cash-flow / income line into a standalone quarter — e.g. Q2 cash paid for acquisitions = the 6-month YTD minus the Q1 3-month (both shown, sharing the same start date). Requires search; ignores accession_number / fiscal_year.
accession_numberNoSpecific filing accession number (from list_filings — which takes vantage_date, so it gives the filing current as of a past date). If omitted, resolves automatically from form_type + fiscal_year (latest filing as of today).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / form_type / description
      Previous value: -"Filing type when auto-resolving (ignored if accession_number provided). Default: 10-K (annual). FPI filers: 20-F/40-F (annual) or 6-K (interim) — the backend auto-resolves the right form family, so the default also serves FPIs (#558)."New value: +"Filing type when auto-resolving (ignored if accession_number provided). Default: 10-K (annual). FPI filers: 20-F/40-F (annual) or 6-K (interim) — the backend auto-resolves the right form family, so the default also serves FPIs."
  2. First observed

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, and the description goes well beyond them: sign conventions for outflow/contra-asset vs IncreaseDecreaseIn concepts, the `(filed −)` hint being per-concept and not a guarantee, and the three distinct share-count concepts. However, it does not describe pagination or what the `<raw_data>` row structure looks like beyond the `value` column, so the disclosure is rich but not complete.

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?

Content is front-loaded with the selection case and every section is load-bearing, but the definition is long and some bullets restate schema behavior (pinning accession_number/fiscal_year, which the schema already documents). The bold-flagged sign section is dense but justified given the quoting risk.

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, high-traffic search tool with no output schema, the description covers selection, query syntax, period pinning, sign interpretation and share-count semantics. An agent has what it needs to call it correctly and to interpret the returned 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?

Schema coverage is already 100%, yet the description adds real meaning: search treats spaces as AND and commas as OR, warns that extra category words silently drop series, recommends one word and manual filtering, explains fiscal_period's latest-filing pitfall, and gives the period_history de-cumulation recipe. This is meaning an agent cannot get from the schema alone.

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?

Opens with a concrete use case (a number the standard statements don't break out) and a specific verb+resource: searches the raw XBRL facts (~3,000 per filing, with dimensional breakdowns). It explicitly contrasts with the sibling `get_financials`, so an agent can choose between them without opening either 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?

Explicit when-to-use (segment/geography/product/customer breakouts, industry metrics, as-filed figures), when-to-use-something-else (`get_financials` is faster for standard statements and the 250+ standard metrics), plus targeted recipes for concentration searches, past filings, and de-cumulating a YTD line via period_history.

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.

Resources