generate_report_for_stock
Write a NEW research note for ONE ticker, now (a few minutes). Never the first call.
The fast path is `get_latest_report([ticker])`: every material event already writes
the symbol's report as it happens, so it usually exists and comes back in seconds
with a `stale` flag. This tool writes a new one on demand: the platform's analyst
researches the symbol's latest episode with its own tools (event web, intraday
tape, technicals, situate, at most one data exploration), states the platform's
official stance, and writes the note. The note REPLACES the symbol's report: later
`get_latest_report` calls return it, and `report_plan` subscribers are notified when
it lands. Two modes:
STANDARD (ticker only): call it ONLY after `get_latest_report` returned the ticker
with `stale: true` or in `missing`, and the user wants a current report rather than
the cached one — tell them it takes a few minutes before you start it. If
`latest_event_at` is only minutes old, that event's own report is probably still
being written: wait for its `report_plan` frame (or call get_latest_report again in
a few minutes) instead. Never fan it out across a list of names.
CUSTOM (`user_override=true` + the shaping fields, a few minutes; like STANDARD it
replaces the symbol's report): the same note, told to cover named line items,
ratios, segments, indicators, estimates, or holders. Bespoke asks usually do NOT
belong here. The better route for "a report on X covering Y":
1. EXPLORE the items the user named — `list_saved_queries` first, then
`explore_data_catalogue` (after `situate` when the ask is event-driven);
2. IDEATE with the user over the result sets — what to keep, cut, add, compare;
3. OVERLAY the agreed results into their template — `get_user_template` returns
the markup to lay the content out in with your own document tooling (no
template saved -> offer `draft_user_template`).
That is faster, iterative, and the user sees the data before it is set in a PDF.
Use CUSTOM mode only when the user explicitly wants the Flexreport note written
around those items and accepts the few-minute wait. Every parameter
after `user_override` shapes a custom report, and the backend rejects it (422)
without `user_override=true` — this tool sets the switch for you whenever any of
them is non-empty, so a shaped request is never silently served the standard
report. Each parameter's description names its vocabulary — never guess, look
each one up.
Event context is SERVER-owned: the backend reads the symbol's latest platform event
and frames the report around it. There is no thesis / change-summary / include_* /
price-date field any more — do not send editorial steer; unknown keys are ignored.
CHOOSING THE SHAPING FIELDS FROM THE ONTOLOGY (custom mode only — do not guess):
read get_company_event_web(ticker) for the latest node, then
get_event_ontology(event_type=node.type), and derive from the card's family and
`informs`:
earnings family -> financial_items + estimate_items from the fundamentals
and estimates families the card informs; add
include_as_report_financials when the user wants the
filed statement (a 10-Q / 10-K anchored event)
institutional_ownership -> institutional_ownership CIKs from the web node's
fetch.cik (a 13F node is FILER-scoped: one filer's
move across several names)
market_movement / news -> technical_analysis_items from the technical_indicators
family (validate names via list_options)
analyst_activity -> estimate_items + ratios
Omit anything the ontology gives no reason for.
Not `generate_research_report`: that answers an open-ended or multi-company
question (peer comps, a theme). This tool is one ticker — and in custom mode, a
very clear list of what to cover.
Asynchronous. Returns {"<TICKER>": {"task_id": "...", "status": "PENDING"}}: read
result[ticker]["task_id"] and poll it with `get_task_status` until SUCCESS (a few
minutes). The task result is the note's saved plan, NOT the PDF: on SUCCESS call
get_latest_report([ticker]) for the document (it comes back `stale: false`). With a
`report_plan` subscription open, the ticker's frame says the same without polling.
Requires auth (your MCP client attaches the OAuth bearer automatically).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ratios | No | EDGAR ratios ("grossProfitMargin") from list_options("financial_ratios"). | |
| ticker | Yes | The ONE ticker to write a new note for, e.g. "SNOW". | |
| user_override | No | CUSTOM mode switch (steer the note toward the shaping fields; it still replaces the symbol's report). Set automatically whenever any shaping field is non-empty. | |
| estimate_items | No | Estimate line items to compare against actuals. | |
| financial_items | No | Standardized EDGAR line items ("revenue", "operatingIncome") from list_options("financial_items"). | |
| revenue_segment | No | The filer's revenue segments ("Product revenue") from list_options("revenue_segments", ticker=...). | |
| as_reported_periods | No | Window(s) the as-reported section shows: "quarter" (discrete three months, the default), "ytd" (cumulative), "annual" (fiscal year, from the 10-K). Several render as adjacent columns. Not cosmetic: a filing states the same concept over more than one window at the SAME period end, so the basis must be explicit. | |
| institutional_ownership | No | Managers to feature, by SEC CIK (any width; the backend pads to 10 digits). Get them from list_options("institutional_managers", q="berkshire") -> {cik, name, category, aum}; pass the `cik` values, never names. | |
| technical_analysis_items | No | Indicators to chart ("rsi", "macd") from list_options("technical_indicators"). | |
| as_reported_financial_items | No | The filer's OWN tagged XBRL concepts ("us-gaap_RevenueFromContractWithCustomer...", or a company extension such as "snow_...") from list_options("as_reported_items", ticker=...). | |
| include_as_report_financials | No | Add an AS-REPORTED statement section built from the SEC filing itself: every figure a tagged XBRL fact deep-linked to its location in the filed document (distinct from the standardized tables, whose derived figures no filer states). Line items come from `as_reported_financial_items` when given, else are chosen to match the narrative. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||