compare_financials
Compare a financial metric across multiple companies using SEC XBRL data, returning actual reported values from filings. Handles non-December fiscal year ends so no ticker is dropped.
Instructions
Compare a financial metric across multiple companies using SEC XBRL data. Returns actual reported values from SEC filings.
Companies with non-December fiscal year ends are automatically handled — no ticker is silently dropped.
Args: tickers: Comma-separated ticker symbols, e.g. "AAPL,MSFT,GOOGL". metric: XBRL concept name. Common metrics: "Revenues" — Total revenue "NetIncomeLoss" — Net income "GrossProfit" — Gross profit "OperatingIncomeLoss" — Operating income "EarningsPerShareBasic" — Basic EPS "EarningsPerShareDiluted" — Diluted EPS "Assets" — Total assets "Liabilities" — Total liabilities "StockholdersEquity" — Shareholder equity "CashAndCashEquivalentsAtCarryingValue" — Cash on hand "LongTermDebt" — Long-term debt "CommonStockSharesOutstanding" — Shares outstanding "ResearchAndDevelopmentExpense" — R&D expense "SellingGeneralAndAdministrativeExpense" — SG&A expense year: Calendar year to compare (e.g. 2024). Defaults to previous year if not specified. quarter: Optional quarter (1-4). 0 = full year (default).
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": {
"tickers": "<tickers>"
},
"name": "compare_financials"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | ||
| metric | No | Revenues | |
| quarter | No | ||
| tickers | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |