Skip to main content
Glama

generate_report_for_stock

FULL REBUILD of ONE ticker's report (~10 minutes). Use sparingly — never the first call.

The fast path is `get_latest_report([ticker])`: a symbol with a fresh saved report
plan comes back under `rendering` and is rendered into the user's template in
~10-20 s; any other symbol comes back with its cached PDF and a `stale` flag. This
tool re-runs the whole pipeline — brief, query planning, SQL, formatting — so it
is for rebuilds only, in one of two modes:

STANDARD (ticker only, ~10 min): rebuilds the symbol's report plan from its latest
event and SAVES it, so later `get_latest_report` calls render it in seconds. Call it
ONLY after `get_latest_report` returned the ticker with `stale: true` or in
`missing`, and the user wants the rebuilt report rather than the cached one — tell
them it takes ~10 minutes before you start it. NEVER for a symbol that came back in
`rendering` (that render already is the fresh report), and never fanned out across a
list of names.

CUSTOM (`user_override=true` + the shaping fields, ~10 minutes, NOT saved): a full
build from scratch around 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 pipeline's own
report rebuilt around those items and accepts the ~10 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; the
result carries the finished report as {"pdf": "<base64>", ...}. Requires auth
(your MCP client attaches the OAuth bearer automatically).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ratiosNoEDGAR ratios ("grossProfitMargin") from list_options("financial_ratios").
tickerYesThe ONE ticker to rebuild, e.g. "SNOW".
user_overrideNoCUSTOM mode switch (build around the shaping fields, not saved). Set automatically whenever any shaping field is non-empty.
estimate_itemsNoEstimate line items to compare against actuals.
financial_itemsNoStandardized EDGAR line items ("revenue", "operatingIncome") from list_options("financial_items").
revenue_segmentNoThe filer's revenue segments ("Product revenue") from list_options("revenue_segments", ticker=...).
as_reported_periodsNoWindow(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_ownershipNoManagers 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_itemsNoIndicators to chart ("rsi", "macd") from list_options("technical_indicators").
as_reported_financial_itemsNoThe 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_financialsNoAdd 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnlyHint=false/destructiveHint=false. The description adds critical behavior: ~10 minute duration, async task_id return with get_task_status polling, standard mode SAVES the plan while custom mode is NOT saved, a 422 backend rejection without user_override, and OAuth attachment. Far exceeds what the annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the rebuild verb and the 'never the first call' warning, and organized into STANDARD/CUSTOM/ontology sections. It is long, but for an 11-param two-mode tool most content earns its place; a few connective passages could be tightened without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite an output schema existing, the description still documents the return contract ({"<TICKER>": {"task_id", "status": "PENDING"}} and the polled result's {"pdf": "<base64>"}). Combined with mode semantics, the 422 rule, auth, and the ontology workflow, an agent has everything needed to call and follow up correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds real value beyond the schema: it explains that user_override is auto-set when any shaping field is non-empty (so a shaped request is never silently downgraded), and provides the ontology-driven derivation rules for choosing which shaping fields to populate. That derivation logic is not present in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource+scope: 'FULL REBUILD of ONE ticker's report (~10 minutes)'. It explicitly distinguishes itself from get_latest_report (the fast path) and generate_research_report (open-ended/multi-company), so an agent can identify the correct tool without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States when to call it ('ONLY after get_latest_report returned stale: true or in missing'), when not to ('NEVER for a symbol that came back in rendering', 'never fanned out'), and names the preferred alternatives for bespoke asks (explore/ideate/overlay via list_saved_queries, explore_data_catalogue, get_user_template). Explicit routing to siblings throughout.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources