canli-fundamentals-mcp 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.mjs +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canli-fundamentals-mcp",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "MCP server for SEC company fundamentals point in time: what was first reported, what was known on any date, and every later restatement, each value with the filing behind it. Computed locally from a hash-checked SEC snapshot.",
5
5
  "private": false,
6
6
  "type": "module",
package/src/server.mjs CHANGED
@@ -404,7 +404,12 @@ export function indexFacts(facts, only) {
404
404
  }
405
405
  const list = [...periods.values()];
406
406
  // Filing order: by date, then accession number, so the order never depends on the file.
407
- for (const p of list) p.vintages.sort(byFiling);
407
+ for (const p of list) {
408
+ p.vintages.sort(byFiling);
409
+ // A 10-Q is not where a full year is restated: Comfort Systems' April 2026 10-Q tagged a quarter's
410
+ // $1.83 billion as all of 2025, which would have replaced the 10-K's $9.1 billion.
411
+ if (p.start && durationKind(p.start, p.end) === "annual" && p.vintages.some((v) => ANNUAL_FORM.test(v.form ?? ""))) p.vintages = p.vintages.filter((v) => !INTERIM_FORM.test(v.form ?? ""));
412
+ }
408
413
  list.sort((a, b) => b.end.localeCompare(a.end) || String(b.start).localeCompare(String(a.start)));
409
414
  if (list.length) units[unit] = list;
410
415
  }
@@ -423,7 +428,7 @@ export function indexFacts(facts, only) {
423
428
  // RevenueFromContractWithCustomerExcludingAssessedTax in 2018, Toyota from us-gaap to IFRS) is
424
429
  // followed across the switch, and every value names the tag it came from.
425
430
  export const FRIENDLY = Object.freeze({
426
- revenue: ["us-gaap:Revenues", "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax", "us-gaap:RevenueFromContractWithCustomerIncludingAssessedTax", "us-gaap:SalesRevenueNet", "ifrs-full:Revenue", "ifrs-full:RevenueFromContractsWithCustomers"],
431
+ revenue: ["us-gaap:RevenuesNetOfInterestExpense", "us-gaap:Revenues", "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax", "us-gaap:RevenueFromContractWithCustomerIncludingAssessedTax", "us-gaap:SalesRevenueNet", "ifrs-full:Revenue", "ifrs-full:RevenueFromContractsWithCustomers"],
427
432
  // Since the 2025 reports many 10-Ks tag the common-stockholders line or ProfitLoss and not NetIncomeLoss.
428
433
  net_income: ["us-gaap:NetIncomeLoss", "ifrs-full:ProfitLossAttributableToOwnersOfParent", "us-gaap:NetIncomeLossAvailableToCommonStockholdersBasic", "us-gaap:ProfitLoss", "ifrs-full:ProfitLoss"],
429
434
  operating_income: ["us-gaap:OperatingIncomeLoss", "ifrs-full:ProfitLossFromOperatingActivities"],