Agent guide

Check a figure against its filing

SEC figures cite the filing they come from, across ~6,000 SEC filers. Here is how an agent traces one back, with the real tool and parameter names.

What each tool cites

get_financials
The accession number and filed date of each period, in a Source footnote, with EDGAR index links in <raw_data>. Quote exact values from <raw_data>; the table abbreviates.
get_metric_history
Each row with an SEC accession links to the filing in the MetricDuck viewer.
get_xbrl_facts
The accession number, and an edgar link to the exact fact in the filing's inline XBRL where one exists.
get_filing_section
The section text, with viewer links to the quoted passage.
get_metric_lineage
The formula and its inputs. A base input carries a filing link; a derived input points to its own lineage.
get_earnings
8-K earnings-release figures. A figure carries a verbatim quote and a deep link when the release has an attested receipt; some figures have none, and a missing receipt is not evidence the value is wrong.

What is not cited, or is cited differently

Earnings-call transcripts and IR documents
Management's own words, labelled by source tier (SEC-filed, Issuer-published or Machine-transcribed). Check the quote; they are not figures from the financial statements.
Stock prices
Prices come from a market-data feed. They are not filed, so they carry no filing citation. Valuation multiples combine a price with filed figures.
Computed metrics
Margins, ROIC, TTM values and derived quarters are calculated by MetricDuck from filed facts; check the derivation with get_metric_lineage. A quarterly input derived from year-to-date facts will not equal any single filed fact.

The call sequence

An example for a company's fiscal 2022 revenue. Replace the ticker, metric and period with your own; the angle-bracket values come from the previous step's reply.

  1. 1. The figure, with its citation

    Each row carries its accession number and a viewer link.

    get_metric_history(ticker="JNJ", metric_id="revenues", period_type="FY", window=5)
  2. 2. The filing that first reported that period

    Returns the filing's accession_number.

    list_filings(ticker="JNJ", form_type="10-K", fiscal_year=2022, fiscal_period="FY")
  3. 3. The fact as filed in that filing

    Each fact has an edgar link to the exact iXBRL fact, where one exists. With period_history=true, each period's value as first filed.

    get_xbrl_facts(ticker="JNJ", search="revenue", accession_number="<accession from step 2>")
    
    get_xbrl_facts(ticker="JNJ", search="revenue", period_history=true)
  4. 4. For a computed metric, its formula and inputs

    Call it again on a derived input to go one level deeper.

    get_metric_lineage(ticker="JNJ", metric="gross_margin", period_type="FY", fiscal_year=2022, fiscal_period="FY")
  5. 5. The sentence in the filing

    The reply links to the passage in the filing viewer.

    get_filing_section(ticker="JNJ", section_id="mda_results_operations",
                       accession_number="<accession from step 2>", query="sales")

When step 1 and step 3 disagree

Usually a later filing restated or recast the period: step 1 serves the latest filed value, and step 3 shows what the original filing said. A different concept (step 1 may be a computed metric; step 4 shows its inputs) or a derived quarter (a fiscal Q4 is the year minus three quarters) can also explain a gap. Both are right for what they claim, so say which one you quote. The point-in-time guide explains when each one is the answer you want.

Point-in-time data and backtests →