Compare Financial Periods
compare_periodsCompare a company's core financial metrics across two fiscal periods side-by-side. Shows absolute and percentage changes with significance classification (minor < 5%, notable 5–15%, significant > 15%). Each row's derived_id cites the percentage change (delta_pct_display) and delta_derived_id cites the absolute change (delta_display): cite the id of the figure you quote. A free_cash_flow row (operating cash flow − capex, as get_valuation_metrics computes it) is in both views: cite each period's figure by period_a_derived_id / period_b_derived_id; a period missing capex or operating cash flow has no figure (reason: INPUT_MISSING, never operating cash flow alone), and a bank's row is withheld (NOT_MEANINGFUL_FOR_SECTOR). The response includes a material_changes count: this is the number of metrics whose significance ∈ {notable, significant} (i.e. absolute percentage change > 5%). Use it as a quick scalar to triage filings — anything > ~3 typically signals a material event worth deeper review. Use period format: 'FY2024' for annual, 'Q1-2024' for quarterly. Pass period_a as the EARLIER period and period_b as the LATER one — if you invert them the server auto-swaps and sets swapped: true in the response so deltas always carry the correct sign (rather than silently flipping). Pass statement: "cash_flow" to get the cash-flow lines instead (D&A, stock-based compensation, deferred taxes, other non-cash items, working-capital changes, operating/investing/financing cash flow, capex, buybacks, dividends): each carries its fact_id, delta_derived_id, a not_reported availability where the filer has no fact and a sign_note saying whether a positive figure is a use or a source of cash. For a cash-flow line quote period_a_statement_display / period_b_statement_display (the sign the statement prints: a use of cash is negative) and cite period_a_statement_id / period_b_statement_id (a fact_id, or a derived_id that verify_facts re-derives); period_x_display keeps the stored XBRL sign. Quote figures verbatim. Point-in-time safe via as_of_date. Available on all plans.
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>",
"period_a": "<period_a>",
"period_b": "<period_b>"
},
"name": "compare_periods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | Yes | Stock ticker symbol, e.g. AAPL, MSFT, BRK.B — or a CIK (SEC identifier), e.g. '0000320193'. | |
| period_a | Yes | Earlier fiscal period. Format: 'FY2023' for annual or 'Q1-2023' for quarterly. | |
| period_b | Yes | Later fiscal period. Format: 'FY2024' for annual or 'Q1-2024' for quarterly. | |
| statement | No | Omit for the 15 core metrics plus free cash flow. 'cash_flow' returns the cash-flow statement lines (and free cash flow) instead; quote each line's `period_x_statement_display` with its `period_x_statement_id`; `sign_note` explains the stored sign. | |
| as_of_date | No | Point-in-time date (YYYY-MM-DD). Only returns facts with accepted_at on or before this date — eliminates look-ahead bias for backtesting. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | Yes | Response metadata (provenance, point-in-time flag, freshness, request id and warnings). Every field is documented once in the agent contract (agent_contract.meta in the server's manifest.json). | |
| ticker | Yes | ||
| changes | Yes | Per-metric deltas: metric, label, period_a, period_b, delta, delta_pct, significance | |
| swapped | Yes | True when inputs were reordered so period_b is the more recent period | |
| period_a | Yes | Earlier period descriptor: label, fiscal_year, fiscal_period, period_end, filing_date | |
| period_b | Yes | Later period descriptor, same shape as period_a | |
| as_of_date | No | ||
| company_name | No | ||
| total_metrics | Yes | Count of metrics compared across the two periods | |
| material_changes | Yes | Count of metrics flagged as a material change |