Recipe: Financial health check
The task
You want a fast public-company health snapshot: revenue trajectory, margin trend, debt-to-equity, insider sentiment, and consumer-complaint posture — rolled up to one verdict.
Tools used: resolve_entity, edgar_company_concept (×4-6), edgar_insider_transactions,
cfpb_company_complaints.
Calls: 6-8, in parallel.
Copy-paste prompt
Give me a financial health check on <company or ticker> using Pipeworx: revenue trend, margin
trend, debt-to-equity, insider buying/selling (read the actual transaction codes, don't just
count Form 4 filings), and CFPB complaint posture. Conclude with one verdict: Strong / Stable /
Watchlist / Concern.
What a good answer looks like
edgar_insider_transactions({ ticker_or_cik: "AAPL" })
returns (live call, 2026-08-06 — one filing trimmed):
{
"cik": "0000320193", "company_name": "Apple Inc.",
"note": "Transaction codes: P=open-market buy (strongest signal), S=sale, A=grant/award (routine comp), M=option exercise, F=tax withholding, G=gift.",
"filings": [
{
"filing_date": "2026-06-17", "form": "4",
"owner": "Newstead Jennifer", "owner_roles": ["Officer (SVP, GC and Secretary)"],
"transactions": [
{ "code": "M", "code_meaning": "Exercise/conversion of derivative security",
"shares": 30104, "acquired_disposed": "acquired", "value_usd": null },
{ "code": "F", "code_meaning": "Shares withheld to pay exercise price or tax",
"shares": 16238, "price_per_share": 296.42, "acquired_disposed": "disposed",
"value_usd": 4813267.96 }
]
}
]
}
A trustworthy answer has:
- a
notefield naming exactly what each transaction code means — don’t skip past it. - per-transaction
code+acquired_disposed+value_usd, not just a filing count. - the four core
edgar_company_conceptpulls each carryingfiscal_year/period_end/valueand alatestshortcut, so trend math is explicit rather than eyeballed. - a
cfpb_company_complaintsresult read alongside itsmatched_via/notefields — see the research a public company recipe for why atotal: 0there is not automatically a clean record.
A plausible-sounding failure looks like a real disposal transaction that isn’t insider
selling. The filing above is real and live. Read only the acquired_disposed field and you’d
tally: one acquired (the M), one disposed (the F) — net roughly flat, or if you’re counting
crudely by “codes that mean shares left the executive’s hands,” you’d log this as a sale. It
isn’t. M is exercising a vested option; F is the company automatically withholding shares to
cover the tax bill that exercise triggered — a mechanical, same-day, non-discretionary pair with
zero market-timing signal. Filter to code: "P" (open-market buy) and code: "S" (sale)
specifically before computing “net buying vs. selling.” A/M/F/G are routine
compensation mechanics, not conviction trades — the note field on every response spells this
out, and the shape of the failure is exactly that a reader skips the note and pattern-matches on
acquired_disposed instead.
Step-by-step tool calls
1. Resolve
const co = await resolve_entity({ type: "company", value: "AAPL" })
// co.ids.cik = "0000320193"
2. Pull recent quarters of key concepts (in parallel)
const concepts = [
"Revenues", "OperatingIncomeLoss", "NetIncomeLoss",
"CashAndCashEquivalentsAtCarryingValue", "LongTermDebtNoncurrent", "StockholdersEquity",
]
const facts = await Promise.all(
concepts.map(c => edgar_company_concept({ cik: co.ids.cik, concept: c }))
)
Each response’s values array carries fiscal_year/fiscal_period/period_end/value, plus a
latest shortcut. Compute revenue YoY, operating/net margin trend, cash on hand, and
debt-to-equity (LongTermDebtNoncurrent / StockholdersEquity) from these directly — live-verified
values for AAPL (period 2026-06-27): revenue $364.36B, net income $101.46B, cash $39.54B,
long-term debt $71.34B, stockholders’ equity $107.52B.
3. Insider sentiment — read the codes
edgar_insider_transactions({ ticker_or_cik: co.ids.ticker })
Filter transactions to code: "P" and code: "S" before computing a net-buying/net-selling
signal — see “What a good answer looks like” above for why counting every disposal as a sale
overstates selling pressure.
4. Consumer-complaint posture
cfpb_company_complaints({ company: co.ids.company_name })
Read matched_via and note, not just total — CFPB matches its own registered legal name
exactly, and a 0 with matched_via: "exact" usually means “no match found,” not “no
complaints.” Full walkthrough in the
research a public company recipe.
Verdict heuristics
Roll up to one of: Strong / Stable / Watchlist / Concern.
| Signal | Strong | Stable | Watchlist | Concern |
|---|---|---|---|---|
| Revenue YoY | >+10% | flat to +10% | -5% to flat | <-5% |
| Operating margin trend | expanding | flat | compressing slightly | compressing >300bp |
| Cash on hand | >12mo opex | 6-12mo | 3-6mo | <3mo |
| Debt-to-equity | <0.5 | 0.5-1.5 | 1.5-3 | >3 |
| Insider net (P/S only) | net buying | flat | net selling | heavy net selling |
| Complaints trend | flat or down | flat | rising | spiking |
Apply the worst category. If 4+ signals land on “Concern,” flag for human review.
Citation pattern
AAPL health: revenue $364.4B (period ending 2026-06-27), cash $39.5B, long-term debt $71.3B, debt-to-equity 0.66 (EDGAR). Insiders: no open-market buys or sells in the latest filing window, only routine option-exercise/tax- withholding activity — no directional signal. Consumer complaints per CFPB: see the note field before reporting a total. Verdict: Stable.
Use the prompt
prompts/get({ name: "financial_health_check", arguments: { ticker: "AAPL" } })
The prompt orchestrates resolve_entity first to chain into the right CIK.
Caveats
- Form 4 transaction codes are not all sell signals.
A/M/F/Gare routine compensation mechanics (grants, option exercises, tax withholding, gifts) — onlyP(open-market buy) andS(sale) reflect discretionary market-timed trades. See the live paired M/F example above. - XBRL concept drift. Companies report
RevenueFromContractWithCustomerExcludingAssessedTaxrather thanRevenuesunder ASC 606 —edgar_company_conceptresolves the common aliases for you and echoes the concept it actually used in theconceptfield. - One-time items. Restructuring charges, gains on sales, etc. distort margin trends. Prefer a multi-quarter smoothed trend over a single-quarter snapshot.
- Heuristics are blunt. Use the verdict as a triage label, not as financial advice.