Skip to main content
Glama

Server Details

An mcp dedicated to real-time streaming of financial market and research, giving ai agents a pulse on the markets.

Ownership verified
Status
Healthy
Uptime
100.0% over the last 24 hours
OAuth
Works in Glama
Last Tested
Transport
Streamable HTTP · MCP 2025-11-25
URL
ChatGPT
–
Claude
–

TDQS

A3.9/5.0

Scored across 78 tools

Disambiguation3/5

Individual descriptions are unusually explicit about routing (e.g. company_financials vs explore_data_catalogue, get_latest_report vs generate_report_for_stock vs generate_research_report), which rescues most pairs. But several clusters genuinely overlap: four+ routes to raw data (explore_data_catalogue, explore_data_coverage, run_saved_query, get_signed_sql_drilldown, download_dataset, get_user_dataset_file) and two optimizer variants differ only by sync/async and LLM layering. An agent can sort them out, but only by reading long cross-referencing prose rather than from the tool names.

Naming Consistency4/5

Nearly everything is snake_case with a recognizable verb_noun shape (get_/list_/save_/draft_/delete_/run_/stream_/optimize_ + noun). The deviations are a handful of noun-only tools (company_financials, company_s1, situate, trace_data_sources) and verb-style variance (generate_report_for_stock vs generate_research_report). Readable and predictable in practice.

Tool Count2/5

78 tools is well past the heavy threshold, even accounting for the genuinely broad domain (filings, 13F, analysts, IR docs, transcripts, screens, strategy books, PDF templates, saved queries, scheduling, streaming, billing). The surface carries near-duplicate entries (optimize_portfolio vs optimize_portfolio_default, list_ir_documents vs list_ir_documents_season, company_s1 plus list_s1_sections) and belt-and-suspenders pairings that could be consolidated or moved behind fewer dispatch tools.

Completeness4/5

Lifecycle coverage is strong: create/read/update/delete for templates, saved queries, datasets, subscriptions and scheduled tasks, plus async polling, provenance tracing and document drilldown. Minor gaps remain — no direct daily price-history/quote tool (intraday and aftermarket only), earnings-call transcripts are readable only one numbered section at a time, and saved queries can be deleted but not edited in place.

Publisher details

Operator
Flexreport Finance · Publisher source
Vendor relationship
First-party
Privacy policy
Not provided
Trust center
Not available
Restrictions
Requires a Flexreport Finance account (OAuth 2.1 sign-in in the browser; free registration via email or Google). Usage is subject to per-plan quotas and rate limits; higher limits require a paid plan (Stripe checkout). No admin approval, regional limits, or custom OAuth app are needed—clients register dynamically.

Available Tools

78 tools
company_financialsA
Read-only
Inspect

A company's EDGAR financial statements, read directly — the targeted tool for "what did X report", revenue / EPS / margins / cash flow by quarter or year, and the tables a financials_release refreshes.

===> Prefer this over explore_data_catalogue for one company's reported statements:
it is synchronous, takes seconds, and returns the rows directly. In a `situate`
result the relation cards of these six tables list it in `read_by`: when one of them
refreshed for the event (a same_chain_run edge to it in the web), call this with
financial_type=<that table>.

TABLES (`financial_type`, each value is the table name):
  edgar_quarterly_financials (default)  standardized quarterly statements
  edgar_annual_financials               standardized annual statements
  edgar_10q_financials / edgar_10k_financials
                                        the facts AS FILED (XBRL concepts) with
                                        accession and filing_url
  edgar_eight_k                         financial tables extracted from 8-Ks
  edgar_financials_yoy_change_m         year-over-year change per line item

PASS line_items. The standardized tables hold dozens of line items per period, the
as-filed tables hundreds of facts: an unfiltered edgar_10q_financials pull cost
28K-108K tokens in testing and was only ever made "for provenance". It is never
needed for that — cite a row with `trace_data_sources` (below) instead.

Rows come back newest period first. A standardized row is {date, fiscal_year, period,
reported_currency, filing_date, accepted_date, symbol, statement, line_item, value,
mapping, last_updated}; `mapping` holds the accession, filing date, XBRL inputs and the
formula. netIncome appears TWICE per quarter — once from the income statement, once
from the cash flow statement; read the `statement` column.

STALE YoY: edgar_financials_yoy_change_m refreshes after the transcript arrives and at
19:00 ET on weekdays, so on the evening of a print it can still show the PRIOR quarter.
Treat it as stale unless its current_period matches the latest date in
edgar_quarterly_financials, and compute the change from the 5 quarters there instead.

CITE A ROW: trace_data_sources(relation=<this financial_type>, keys=[{"symbol": "MAR",
"date": "2026-09-30", "statement": "income statement", "line_item": "epsDiluted"}])
returns the 10-Q / 10-K and its sec.gov link. For the YoY view the keys are symbol,
line_item and current_period.

US SEC filers only (the EDGAR side); a non-filer has no rows here — situate's
`source_routing` says which side a company is on. A 404 means the symbol is not
covered (onboard_symbol), a 422 a bad argument. Requires auth (your MCP client
attaches the OAuth bearer automatically).

Inputs: symbol (required), limit, line_items, financial_type. Returns: note, rows, count, symbol, +1 more

company_s1A
Read-only
Inspect

A company's S-1 registration statement (IPO prospectus) read directly — its key passages, verbatim, and its tables. The targeted tool for "what does X's S-1 say about ...", risk factors, use of proceeds, dilution, the business and its numbers before listing.

===> CALL list_s1_sections(symbol) FIRST and pass `sections`. An unfiltered passages
read of one filing runs to about 390 KB — more than most contexts take in one
result. list_s1_sections is small: each section that holds key passages, its pages,
and how many passages it holds. Pick the sections the question needs, then call
this with sections=[...]. Read s1_raw_tables only when the question needs a table's
numbers, and keep limit=1 unless comparing filings.

`situate` web nodes for an S-1 carry a fetch hint that calls this tool with
{symbol, table_names, limit}; add `sections` to it rather than running it bare.

Returns {"symbol", "s1_significant_passages": [...], "s1_raw_tables": [...]}.
  passage rows  passage_id, section, anchor, page_number, type, passage (VERBATIM
                filing text — quote it as is), why_significant (a model's note on
                why it matters: attribute it to the analysis, never to the filing)
  table rows    page_number, table_number, table_context, table_text
Every row carries accession_no, form ("S-1" or "S-1/A"), filing_date and source_url
(the filing on sec.gov): cite the filing with them. With limit > 1 the rows of
several filings arrive together; tell them apart by accession_no / filing_date.

Errors: a 404 means no S-1 is stored for the symbol; a 422 a bad argument.
Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: symbol (required), limit, sections, table_names. Returns: note, symbol, s1_raw_tables, s1_significant_passages

delete_event_subscriptionA
DestructiveIdempotent
Inspect

Remove a saved event subscription (DELETE /event-subscription/{subscription_id}).

Returns {"status": "DELETED", "subscription_id": ...}; any stream still open on it
ends with a `closed` frame within one read cycle (<= 8 s). 404 `unknown
subscription_id` for a missing id or another user's id. Registrations are
rate-limited (30/hour), so delete subscriptions the user is done with rather than
registering fresh ones for every session.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: subscription_id (required). Returns: status, subscription_id

delete_saved_queryA
DestructiveIdempotent
Inspect

Delete one of your saved data requests by id.

Deletion is permanent and touches no data, but the query
tokens go with the row and cannot be reconstructed: re-creating it means running
`explore_data_catalogue` again and re-saving. When more than one row looks like a
match, confirm WHICH one with the user before calling.

Ownership is enforced server-side. A 404 ("No saved query with id N") means the id
does not exist OR is not yours — the backend deliberately does not distinguish the
two, so never tell the user the row belongs to someone else.

Returns {"msg": "Deleted saved query <id>"}.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min.

Inputs: query_id (required). Returns: msg

delete_scheduled_taskA
DestructiveIdempotent
Inspect

Delete a scheduled task (cron job) by its name.

For workflow schedules `task_name` is the value `schedule_task` returned as
`task_name`. Deleting removes only
the cron schedule; the saved workflow definition is kept and can be
re-scheduled by re-saving it via `schedule_task`. For a "ds:" dataset schedule the
dataset and its files stay (re-save via `save_user_dataset` to resume;
`delete_user_data_feed` removes the dataset itself). Returns
{"msg": "<task_name> deleted"} on success, or an error if no such task exists.

Inputs: task_name (required). Returns: msg

delete_user_data_feedA
DestructiveIdempotent
Inspect

Delete one of the user's own datasets completely: its schedule, every file it built, its fixed latest_url link, and the saved query behind it. It can't be undone — confirm with the user first, naming the dataset. To only stop the builds and keep the files, use delete_scheduled_task("ds:{email}:{name}") instead.

Returns {msg, dataset_id, schedule_deleted, files_deleted, saved_query_deleted}.
Errors: 404 = the user has no dataset of that name; 503 = a step failed partway —
call again with the same name (every step is safe to repeat).

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: dataset_name (required). Returns: msg, dataset_id, files_deleted, schedule_deleted, +1 more

delete_user_templateA
DestructiveIdempotent
Inspect

Delete the user's saved PDF template so their PDFs go back to the standard layouts.

Permanent and there is no history: re-creating the format means drafting and
saving again. Confirm with the user before calling. Ownership is enforced
server-side, so only the caller's own template can be removed.

Returns {"msg": "Template deleted. Your PDFs will use the standard layouts."}.
A 404 means there was nothing saved to delete.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min.

Inputs: no named parameters. Returns: msg

detect_intraday_outlier_jumpsA
Read-only
Inspect

Live look at TODAY's intraday tape, flagging outlier price jumps.

Pulls today's intraday bars for `symbol` (US/Eastern trading day) live at the given
`frequency` and flags each bar whose move is a statistical outlier versus the stock's
own daily-return volatility — i.e. bars where |z-score| of the move exceeds
`zscore_threshold`. Use it for a quick "is the stock making an abnormal intraday move
right now?" read.

Synchronous — returns the flagged bars directly (no task id to poll). Returns a
404-style error if no intraday data is available yet (e.g. before the market opens or
for an uncovered symbol).

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: symbol (required), frequency, zscore_threshold. Returns: latest, series, symbol, outliers, +6 more

download_datasetA
Read-only
Inspect

Read one of Flexreport's versioned daily data feeds by date — the feeds and what each holds come from list_options("data_feeds"). Use it over explore_data_catalogue when one of those feeds answers the ask for a date or date range. RATE-LIMITED TO 3 CALLS PER WEEK per user (all datasets together, failed calls included): make ONE call with the narrowest dates, never test-fire it, never re-call because a result was trimmed, and never poll it from a dashboard — fetch once and embed the rows.

list_options("data_feeds") lists the feeds — free, no rate limit — each as
{dataset, description, returns, date_field, event_types}: `returns` is "rows" or
"download_links" (presigned URLs), `date_field` is the column the dates filter on,
and `event_types` the valid filter values (null = unsupported). This tool checks
`dataset` and `event_types` against that list before spending a download call. For
open-ended analysis ("why did X move") keep to explore_data_catalogue.

Sizing — always pass explicit ET dates, the narrowest that answer the request, and
widen only when the user asks ("this month", "since launch"): the week ahead for
forward-looking predictions; the most recent completed date for "how did it do"; one
business day for documents (nightly files land after the 22:00 ET build, so before
then the latest complete day is the previous business day). A range with nothing
published returns no rows, not an error.

Shaping, applied here to the one response:
- Every row carries `published_at`, the UTC time its file version was published —
  quote the result's `published_at` as the data's as-of.
- Document feeds (rows with `document_url` + `page_number`) come back ONE ROW PER
  DOCUMENT (page columns dropped, `pages_with_text` added); include_page_text=true
  returns the page rows with their full `content`.
- `download_links` feeds return links valid 12 HOURS: hand each `url` to the user as
  a link, never store it or inline the file.

Returns {dataset, start_date, end_date, bulk_download, latest_file_version, shape,
rows, row_count, truncated, published_at, notes}. `notes` lists what was left out
(pages collapsed, symbols filtered, rows truncated) — tell the user in one line.

Requires auth (your MCP client attaches the OAuth bearer automatically). Also counts
once against the plan's daily request quota.

Inputs: dataset (required), start_date (required), symbols, end_date, +6 more.

download_pdf_from_urlA
Read-only
Inspect

Fetch a presigned S3 PDF URL server-side and return the document as base64.

The FALLBACK for reading a report: `get_latest_report` returns only a presigned
`url`, and fetching that link yourself (an HTTP / web fetch) is the normal way to
read the PDF. Use this only when your client cannot reach the link but can run code
to decode base64 — the result is large (~120K characters for a 5-page note, ~750K
for a 20-page report with charts) and is no use to a model that cannot decode it.
The backend fetches the URL for you and streams the PDF back. Only S3 URLs are
accepted: the host must end in "amazonaws.com" and contain "s3"; any other host is
rejected with a 400 (SSRF guard).

Returns {"file_name": ..., "media_type": "application/pdf", "report": "<base64 pdf>"}
— decode `report` to read, render, or save the PDF.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: url (required), file_name (required).

draft_custom_datasetA
Read-only
Inspect

EVENT/NEWS FEEDS (filings, decks, earnings, news) — RESEARCH FIRST, then draft: 1) situate(event_types=[the feed's event types]) — or situate(question=<the user's words>) — then get_event_ontology(event_type=...) for each to learn where it persists (persisted_in); 2) agree definitions with the user before drafting — universe, window, and what any loose term means (e.g. the proxy for "the AI trade"); 3) ONE SCOPED explore_data_catalogue census of company_event_node for the universe and window (tickers, dates, a row limit in the wording); 4) draft a request naming the table and column for each field, e.g. title from earnings figures, body from eight_k_timeseries_analysis.summary, link sec_link, guid company_event_node.node_id, pub_date occurred_at, ticker symbol_metadata.exchange || ':' || symbol; 5) refine with previous_draft_id + feedback, asking for ONE candidate when variants don't matter. PLAIN DATA FEEDS ("daily close and 20-day volume for AAPL, MSFT") skip all this and draft directly.

RESEARCH REPORTS ARE IN EVERY FEED BY DEFAULT: the build adds a `research_url` column to every row with a `symbol` or `ticker` column — a fixed, signed, sign-in-free link that serves the research report PDF behind that item (rss/atom items show it as a "Research" link). Don't put report links or /get-cached-reports in the request or in a column; just keep a bare `symbol` (or `ticker`) column in the draft (a company_symbol / EXCHANGE:TICKER column alone gets no research link). That link is ONLY for the feed's readers (redistribution): never call it, build one, or offer it as a way to download a report — the user gets reports through get_latest_report, and Flexreport's daily files through download_dataset.

Drafts the user's OWN dataset — a table built from Flexreport data on a schedule and published as a file (parquet, csv, tsv, json, jsonl, xlsx, xml, or an rss/atom feed) behind a fixed link — from a plain-English description. Step 1 of 2: draft (and refine) here, then save_user_dataset schedules it. Use when the user wants a custom data feed or a recurring file of their own ("build me a daily file of...", "an RSS feed of...", "a JSON feed I can poll"); for Flexreport's published feeds use download_dataset, and for a one-off look at the data use explore_data_catalogue. This is THE tool for any request worded as a "datafeed" or "feed" — never substitute schedule_task, an emailed workflow or a one-off file. Every column comes from stored data, and that includes the summaries and analysis Flexreport already stores (deck, press-release and 8-K summaries, key figures, flags, recommendations, research views), so a feed with summary columns is still a dataset; only new written analysis generated fresh each run is a schedule_task workflow (a transform step).

Asynchronous: returns {draft_id, task_id, status: "PENDING"}. Poll task_id with
get_task_status until SUCCESS — a draft takes about 45 s-4 min (validation, planning, a
sample run, finalize). On SUCCESS `result` is:
  {draft_id, validation_status: "OK" | "REJECTED", reason?, suggested_alternative?,
   user_request,
   candidates: [{name, description, columns, row_count, sample_rows, query_token,
                 has_fixed_dates, suggested_date_mode}]}
REJECTED -> relay `reason` and `suggested_alternative`; don't retry blindly.

Show the user each candidate's description, columns, row_count and a few sample_rows
and let them pick one. NEVER show `query_token` — it is an opaque sealed query whose
only use is save_user_dataset — but keep the chosen candidate's for the save.
- Samples show datetime columns as dates only; the built file keeps the full
  timestamp, so never tell the user a timestamp is missing from a sample.
- Candidates can be near-identical: compare their descriptions, not just the samples.

Pass `target_format` when the user has named one (always for rss/atom). A candidate
with a column named `published_at` can't be saved (that name is reserved for the
build time): refine it with feedback asking to rename the column.

To refine, call again with the SAME `request`, previous_draft_id=<draft_id> and
`feedback`; ask for "ONE candidate" when the variants don't matter. Each round is a
new draft with its own draft_id. Ask before saving: name,
schedule, and (if not the suggestion) date mode.

Rate-limited to 20 drafts per hour per user. Requires auth (your MCP client attaches
the OAuth bearer automatically).

Inputs: request (required), feedback, sample_rows, target_format, +1 more. Returns: queue, status, task_id, draft_id

draft_user_templateAInspect

Render preview images of a user's PDF template so they can approve it BY LOOKING, before anything is saved.

THE POINT: a user wants their research in THEIR format — their masthead, colours,
layout, branding. A saved template is a BLUEPRINT: the author's stylesheet and
page chrome plus one markup pattern per content kind, which the backend applies
automatically to every PDF it renders for that user. A template is a visual
choice, so it is signed off by looking at rendered pages, never by describing
them. This is STEP 1 OF 2: it compiles the submitted HTML into a blueprint under
several treatments and renders each one as PNG previews of the platform's
SPECIMEN DOCUMENT — one of every content kind (title, lead, sections, bullets,
KPI cards, tables, charts, figure, source line, footnote). The user signs off on
how the design treats each kind of content, not on sample text. NOTHING IS
STORED — the draft lives in a 24-hour cache; `save_user_template` is step 2.

THE FLOW:
  1. Author the HTML with the user (or take the page they hand you).
  2. Call this, then poll `get_task_status(task_id)` until SUCCESS. Show the user
     EVERY variant's `preview_urls` (render the images
     inline where the client can; otherwise give the links) with its `name` and
     `rationale`, side by side.
  3. The user picks one -> `save_user_template(draft_id, variant_id)`. Never save
     a treatment the user has not seen and approved. Later changes go through
     `update_user_template`.

`template_type`:
  - "add_on"  — the previews are rendered at the 360pt column width the block
    will occupy inside a report — anything wider is clipped, not scaled — and
    the treatments restyle it to sit inside the host document (its own page
    background, masthead and disclaimer are stripped).
  - "bespoke" — the template drives the whole document: page chrome, stylesheet
    and the pattern for every content kind, previewed as full pages.

TEMPLATE RULES (violations come back as a 422 with `detail.errors`):
  - Real CSS engine: grid, flexbox, gradients, absolute positioning all work.
    Add `break-inside: avoid` to a panel that must not split across pages.
  - Only `data:` URIs for images. External images, stylesheets and web fonts are
    BLOCKED; <script>, <link> and similar are stripped.
  - HTML only, max 200 KB; must parse as HTML.

Asynchronous: returns {"task_id", "status": "PENDING", "next_step"}. Poll
`get_task_status(task_id)`; the finished result is {"draft_id", "variants":
[{"variant_id", "name", "rationale", "preview_urls": [...], "preview_pages"}],
"expires_in_seconds", "next_step", "warnings"} (or {"error", "warnings"} when the
draft failed). `preview_urls` are time-limited presigned PNG links, one per page.
Read `warnings`: a treatment that "changed too much" was dropped, and an empty
variant list means no usable adaptation survived — revise the template rather
than retrying the same one.

Runs a model pass plus a render per treatment, so expect minutes. Requires auth
(your MCP client attaches the OAuth bearer automatically). Rate-limited 30/min.

Inputs: template (required), template_type (required), anchor. Returns: status, changed, task_id, next_step

explore_data_catalogueAInspect

Explore Flexreport's data platform with an OPEN-ENDED question — designed to handle many research based or open ended questions, enabling interactive EDA.

===> ONE company's reported statements (revenue, EPS, margins, cash flow by quarter
or year, what a 10-Q / 10-K / 8-K reported) are a direct read: `company_financials`,
synchronous, seconds — not a multi-minute job here.

===> BEFORE running this, call `list_saved_queries` and match the question against
the saved rows — on each row's `metadata` (`summary`, `parameters`, `datasets`),
not on the `user_request` label, skipping any row marked `stale`. A row of the
same SHAPE — same metric, same window, only the company / filer / date / count
differs (saved: "the past 8 quarters of sales for TGT"; asked now: "KSS's last 8
quarters of sales") — is answered by `run_saved_query(query_tokens=<that row's
query_placeholder>, values={...}, max_rows=500)` in seconds, the values keyed by
`metadata.parameters`: the backend re-aims the saved queries at the new entities,
no planning job, no draw on the 20/hour budget. An EXACT repeat replays the row's
`queries` tokens as saved. Only when nothing saved fits, or the replay answers 422
(the request could not be mapped onto the saved slots), run this tool.

===> AFTER the exploration completes and the results are shown, offer ONCE to save
it with `save_user_query`: tell the user the request can then be re-run exactly
(same queries, live data) OR re-asked for other companies, filers, or windows in
seconds. Offer when the exploring is done, not mid-iteration, and never save by
reflex.

===> For anything EVENT-DRIVEN about a company (a print, a filing, a 13F move,
news, "what happened"), call `situate(symbols=[...])` first: its table cards say
which relations HAVE refreshed since the event and which tool reads each
(`read_by`) — use that tool when it is not this one, and name only refreshed
relations in this tool's `query`. Otherwise:

===> THE DEFAULT, FIRST-STEP tool whenever the user wants to EXPLORE the data or
understand a topic from the data (e.g. "use Flexreport to explore...", "how are
small caps doing — explore the data", "how have semiconductor margins trended?").
It validates the request, plans queries against the data catalogue, runs them, and
returns the raw result sets to render as INTERACTIVE CHARTS AND TABLES on the
dashboard. Coverage questions are NOT this tool: for an enumeration ("which
symbols / sectors / indicators are available?", "is X covered?") use
`list_options` — instant, no async job; for a coverage COUNT or breakdown ("how
many symbols are in the investor relations dataset?", "what's the count by
sector?") use `explore_data_coverage`, the dedicated public tool. Reach for THIS
tool when the user wants the DATA itself — values, history, trends, comparisons.

*** RUN THIS BY ITSELF FIRST. DO NOT ALSO LAUNCH `generate_research_report` FOR THE
SAME QUESTION. *** These two tools are SEQUENTIAL STEPS, never parallel:
  1. `explore_data_catalogue` (this tool) — the LEAN route: a validate -> plan -> run
     pipeline with no report-rendering step. Usually finishes in about a minute, but
     run time varies with the tables queried and can reach ~5 minutes. Poll it, SHOW
     the user the resulting charts/tables, and let them iterate.
  2. `generate_research_report` — the slow (~10-12 min), professional analyst-grade
     deep-dive. Reach for it ONLY LATER, AFTER the user has seen the exploration and
     EXPLICITLY asks for the full report. Firing both at once wastes a ~10-min job,
     burns the 20/hour budget, and produces confusing duplicate polling.
There is no `delivery` argument here: results always go to the dashboard so the user
can interact with them. The job is rate-limited to 20/hour per user server-side.

Asynchronous: returns {"task_id": "...", "status": "PENDING"}. Poll a SINGLE task
with `get_task_status` until SUCCESS (the result is a plain dict — there is NO nested
task to chase). Expect roughly 1-5 minutes depending on the tables queried — a task
still PENDING after a couple of minutes is normal, so keep polling. On SUCCESS,
`result` is:
  {"user_query": "...", "delivery": "dashboard",
   "results": {"<query name>": {"description": "...", "columns": [...],
                                 "rows": [...the FULL result set...],
                                 "row_count": N}, ...}}
`rows` is NOT sampled — it carries every row (`row_count` matches len(rows)), so
charts/tables reflect the whole population.

Each entry ALSO carries `query_token`: the planned SQL sealed into an opaque token.
It is not readable and never for display — its one use is `save_user_query`, which
stores the tokens so `run_saved_query` can replay THIS EXACT request later in
seconds instead of re-planning it. Saving also makes the backend author a
PLACEHOLDER twin of each query plus a `metadata` slot schema, so the same request
can be re-asked for another company, filer, or window by passing typed `values`
for those slots. That is what to offer once the exploring is done (see the top of
this docstring); a saved row also spares the 20/hour budget.

CITE WHAT YOU PUBLISH: a result's `columns`/`rows` may carry `_source_*` columns —
`_source_url`, `_source_filed_at`, `_source_document_id`, `_source_citations` —
alongside a `sources` block naming each relation, its grain, and whether it is
`traceable` per "row" or only as a "cohort". That is the provenance of the numbers,
not padding: quote `_source_url` when the user asks where a figure came from, and for anything
you are about to publish — or the moment they ask for the filing, the quote, or
"how do you know" — pass `sources.relations[].relation` plus each row's
identifying columns (the grain AND its date) to `trace_data_sources`, which
resolves them to the source document, the
section, or the verified quote behind the number. `get_document_section` then opens
the exact speaker turn a transcript citation points at.

Render each entry as a chart/table for the user. If the request can't be served from
the platform's data, `result` instead carries a `validation_status` of "REJECTED"
(with a reason) — relay that rather than retrying blindly.

EVENT-DRIVEN QUESTIONS: when the question is about something that just HAPPENED
(an earnings print, a 13F move, a downgrade, a news item), consult
get_event_ontology(event_type=...) BEFORE writing the query and name the relations
from its `entails.<layer>` in the query text (prefer gold / analysis relations over
base tables). Skip any relation whose refreshed_by[].schedule[].next_run_at is
after the event — it does not hold the event yet and the query will show the prior
period as if it were the reaction.

Inputs: query (required). Returns: queue, status, task_id

explore_data_coverageAInspect

Answer a question about WHAT THE PLATFORM COVERS — how many symbols a dataset holds, broken down any way you like.

===> THE TOOL for coverage COUNTS and BREAKDOWNS: "how many symbols are covered in
the investor relations dataset?", "what's that count by sector — how many tech
names?", "how many companies have earnings transcripts / 13F ownership / insider
activity / analyst estimates?", "how far back does the fundamentals history go?",
"what's your UK coverage by sector?". It plans queries over BOTH the catalogue's
own metadata and the datasets themselves, so it can count what no enumeration
endpoint knows: which symbols actually carry a PARTICULAR dataset, grouped by
sector, industry, country, market cap, or year.

PUBLIC at the backend — no account, plan, or entitlement is needed to answer a
coverage question, by design: a prospect evaluating the platform should be able to
ask what it covers. (The MCP connection itself still carries the client's OAuth
session — that gate is transport-wide, not this tool's.) Never treat a coverage
question as plan-gated or quota-gated, and never tell the user it needs an upgrade.

Pick between the three coverage-adjacent routes by what the answer looks like:
  - a LIST of what exists ("which sectors / indicators are available?", "is X
    covered?") -> `list_options`. Instant, no async job.
  - a COUNT or breakdown of coverage -> THIS tool.
  - the DATA itself (values, history, trends, comparisons) ->
    `explore_data_catalogue`.
Do NOT answer a coverage count from memory, from the "2,900+ companies / ~420
indices" headline figures, or by eyeballing the length of a `list_options`
payload — those are universe-wide totals and say nothing about per-dataset
coverage. Run this tool.

There is no `delivery` argument: results always go to the dashboard so the user can
interact with them. Rate-limited to 20/hour server-side.

Asynchronous: returns {"task_id": "...", "status": "PENDING"}. Poll a SINGLE task
with `get_task_status` until SUCCESS (the result is a plain dict — there is NO
nested task to chase). Expect roughly 1-5 minutes depending on the tables queried —
a task still PENDING after a couple of minutes is normal, so keep polling. On
SUCCESS, `result` is:
  {"user_query": "...", "delivery": "dashboard",
   "results": {"<query name>": {"description": "...", "columns": [...],
                                 "rows": [...the FULL result set...],
                                 "row_count": N}, ...}}
`rows` is NOT sampled or truncated — every bucket of a breakdown comes back
(`row_count` matches len(rows)), so the totals you report are the real ones.
Render each entry as a chart/table for the user. If the request can't be served
from the platform's data, `result` instead carries a `validation_status` of
"REJECTED" (with a reason) — relay that rather than retrying blindly.

Inputs: query (required). Returns: queue, status, task_id

generate_report_for_stockAInspect

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 situate(symbols=[ticker]) for the latest web 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).

Inputs: ticker (required), ratios, user_override, estimate_items, +7 more. Returns: Keyed by the uppercased ticker: {"<TICKER>": {"task_id", "status", "symbol"}}.

generate_research_reportAInspect

Answer an OPEN-ENDED or THEMATIC research QUESTION (extensible, multi-section).

===> THE RIGHT TOOL when the user's intent is a QUESTION rather than a request for an
existing report — an exploratory or thesis-style ask about a ticker, or a market-wide
theme not tied to one company (e.g. "Are large caps driving earnings season?",
"What's the bull/bear case on NVDA?", "high-growth semis with rising estimates").
For a plain "get me the latest report/research on <ticker>", use `get_latest_report`
instead. This is the slow, professional DEEP-DIVE — reach for it only when the user
EXPLICITLY asks for a full writeup, not for an ordinary exploratory question.

If the user only wants to EXPLORE the data or "use Flexreport to explore...", do NOT
start here — call `explore_data_catalogue` first (interactive charts/tables, usually a
few minutes rather than ~10-12) and
reach for THIS deep-dive only later, once the user has reviewed the exploration and
EXPLICITLY asks for the full report. Never run both for the same question at once.

Rate-limited to 20/hour per user server-side.

Asynchronous: returns {"task_id": "...", "status": "PENDING"}. Poll with
`get_task_status` until SUCCESS, then read its `result`.

Inputs: query (required), delivery. Returns: status, task_id

get_13f_cik_allocationA
Read-only
Inspect

One 13F filer's portfolio weights by sector or industry per quarter, compared with all institutions — the direct read for "how is this fund positioned" and where it tilts.

FLOW: list_options("institutional_managers", q="citadel") gives the CIK.

Returns {"cik", "group_by", "limit", "count", "rows"}, newest quarter first. A row is
{date, cik, manager_name, sector OR industry, positions, value, weight_pct,
previous_quarter_weight_pct, weight_chg_pts, all_institution_weight_pct, covered_value,
reported_portfolio_value, coverage_pct}.

READING THE NUMBERS:
- `weight_pct` IS A SHARE OF `covered_value`, NOT OF THE WHOLE PORTFOLIO. It covers long
  stock positions mapped to a symbol; ETFs, unmapped CUSIPs and options are excluded.
  Median coverage for Registered Investment Advisors is 41.5% of the reported portfolio.
  ALWAYS report `coverage_pct` alongside a weight.
- `coverage_pct` and `reported_portfolio_value` are null except for the filer's latest
  profiled quarter. Citadel reads 15.94% because its reported $875B is mostly options.
- `previous_quarter_weight_pct` is 0 if the filer held nothing in that group in a quarter
  it filed, and null if it did not file that quarter.
- `all_institution_weight_pct` is null for a partial quarter. Tilt is `weight_pct` minus
  this value; compute it, since it is not returned.
- A fully exited group has no row, so a quarter's `weight_chg_pts` won't sum to 0.
- Sector and industry labels are current, not historical.

DATA QUALITY: a small share of values are wrong as filed or parsed, and they are not
corrected, so an implausible value or jump may be a filer error.

A large filer's first call can take several seconds; repeats are far faster. An empty
result means no rows for that CIK (`note` is set only then). A 422 means a bad CIK or
limit. Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min; counts toward plan quota.

Inputs: cik (required), limit, group_by. Returns: cik, note, rows, count, +2 more

get_13f_ownership_by_manager_typeA
Read-only
Inspect

Who owns a stock by manager type (hedge funds, pension funds, mutual funds...), per quarter, with quarter-over-quarter and year-over-year changes — the direct read for "are hedge funds buying X".

Returns {"symbol", "count", "rows"}, one row per manager type per quarter, newest
quarter first. A row is {date, symbol, investor_type, total_shares, num_investors,
current_period_value, previous_quarter_value, previous_year_value,
previous_quarter_change, previous_year_change}.

READING THE NUMBERS:
- The changes are percentages of VALUE, so they include price moves. Read them alongside
  `total_shares` before calling something buying or selling.
- The changes are not a share of the company.
- A change is null when the prior period has no row or a value of 0. Year-over-year only
  exists from 2025-12-31 onward, because 8 quarters are retained.
- Quarters still partial during the 13F filing window are hidden, so the newest quarter
  can be missing until filings land.
- A cohort that fully exits has no row, so it never shows -100%.

DATA QUALITY: a small share of values are wrong as filed or parsed, and they are not
corrected, so an implausible value or jump may be a filer error.

AN EMPTY RESULT means no rows, not necessarily no holders: BRK.B is not in coverage, so
it returns nothing even though 4,946 filers hold it. `note` is set only then. A 422 means
an invalid manager_type or symbol. Requires auth (your MCP client attaches the OAuth
bearer automatically). Rate-limited 100/min; counts toward plan quota.

Inputs: symbol (required), limit, manager_type. Returns: note, rows, count, symbol

get_13f_position_changesA
Read-only
Inspect

What one 13F filer bought, sold or held in its latest filed quarter, one row per position — the direct read for "what did this fund buy or exit".

FLOW: list_options("institutional_managers", q="blackrock") gives the CIK.

`position_filter` DEFAULTS TO NEW AND CLOSED to keep the payload down. BlackRock with
all five statuses is 2,680 rows and 1.16 MB, so widen it only when the question needs
the adds, trims or unchanged holdings.

Returns {"cik", "position_filter", "count", "rows"}, largest value first. A row is
{date, symbol, manager_name, status, shares, value, prev_shares, prev_value, share_chg,
share_chg_pct, value_chg, value_chg_pct, accessions, sec_urls}. `accessions` and
`sec_urls` are lists because a position can come from more than one filing; a CLOSED row
cites the last filing that reported the position.

DATA QUALITY: a small share of values are wrong as filed or parsed, and they are not
corrected. An implausible value or jump may be a filer error: check `sec_urls`.

An empty result means no rows, not necessarily no activity: `note` says so. A 422 means
a bad CIK. Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min; counts toward plan quota.

Inputs: cik (required), position_filter. Returns: cik, note, rows, count, +1 more

get_aftermarket_dataA
Read-only
Inspect

Query STORED after-hours 15-minute bars (open/high/low/close/volume) for symbols.

Returns the extended-hours bars the backend has captured for `symbols` — one row per
symbol per 15-minute bar, 16:00-20:00 ET, ordered by symbol then bar time DESC (so the
first row per symbol is the latest bar). This is the recorded aftermarket tape, NOT a
live feed; it is polled every 15 minutes from 16:30 ET through the evening, so a bar
can lag the wall clock by up to ~15 minutes. For a live intraday read of the regular
session use `detect_intraday_outlier_jumps` instead.

Leave both datetimes off for "today's aftermarket tape". An empty `bars` list means no
bars were captured in the window (e.g. before 16:30 ET, or on a non-trading day) — not
an error.

Requires auth (your MCP client attaches the OAuth bearer automatically). Rate-limited
to 300/minute per user server-side.

Inputs: symbols (required), end_datetime, start_datetime. Returns: bars

get_analyst_estimatesA
Read-only
Inspect

One company's quarterly analyst consensus — EPS, revenue, EBITDA and net income averages, EPS/revenue low-high, analyst counts, consensus YoY growth — for the next 4 quarters and the quarters just ended, newest period first. The direct read for "what does the street expect from X".

FLOW: get_earnings_history for the reported EPS/revenue surprise per quarter;
company_financials for the GAAP statements.

Returns {"symbol", "limit", "count", "rows", "note"}, newest period first. A row is
{symbol, period_end, period_ended, eps_avg, eps_low, eps_high, revenue_avg, revenue_low,
revenue_high, ebitda_avg, net_income_avg, num_analysts_eps, num_analysts_revenue,
eps_yoy_growth, revenue_yoy_growth, est_range_is_modeled}.

READING THE NUMBERS:
- Actual vs estimate is worked out by the agent: line an ended quarter up with
  company_financials by period_end to the NEAREST date (they can differ by a day, e.g.
  2025-10-24 vs 2025-10-25), or use get_earnings_history for EPS/revenue surprise.
- EPS here is adjusted; EDGAR EPS in company_financials is GAAP, so comparing the two
  directly misreads a beat as a miss (CSCO: 0.85 GAAP vs 1.03 consensus).
- Growth columns are consensus vs the year-ago quarter's consensus, as FRACTIONS
  (0.05 = +5%).
- eps/revenue low and high are null when est_range_is_modeled: the vendor's band there
  is synthetic.
- There is no estimate revision history: an ended quarter shows only the final
  pre-report consensus.
- A just-ended quarter can be period_ended=true before it is reported.

An unknown symbol returns no rows (never a 404): `note` is set only then. A 422 means a
bad symbol or limit. A 401 means the sign-in expired (your MCP client re-runs OAuth).
Requires auth (your MCP client attaches the OAuth bearer automatically). Rate-limited
100/min per user; counts toward plan quota.

Inputs: symbol (required), limit. Returns: note, rows, count, limit, +1 more

get_analyst_rating_actionsA
Read-only
Inspect

One company's analyst rating actions — upgrades, downgrades and maintains, firm by firm — newest first. The direct read for "who downgraded X", "recent analyst actions on X".

FLOW: get_analyst_rating_summary for where each firm stands now and the consensus;
get_analyst_estimates for the numbers behind the ratings.

Returns {"symbol", "count", "rows", "note"}, newest first. A row is {date,
rating_company, prev_rating, new_rating, action, news_title, publisher, news_url}.
- action is "upgrade", "downgrade" or "maintain".
- Ratings are in each firm's own words (Overweight, Buy, Outperform...): do not map them
  onto one scale without saying so.
- news_* are null for most actions: only each firm's latest sourced article is on file.

An unknown symbol returns no rows (never a 404): `note` is set only then. A 422 means a
bad symbol or limit. A 401 means the sign-in expired (your MCP client re-runs OAuth).
Requires auth (your MCP client attaches the OAuth bearer automatically). Rate-limited
100/min per user; counts toward plan quota.

Inputs: symbol (required), limit. Returns: note, rows, count, symbol

get_analyst_rating_summaryA
Read-only
Inspect

Where the analysts stand on one company now — the consensus rating, how many firms cover it, each firm's current rating and latest action, and a written analysis. The direct read for "what's the street's rating on X".

FLOW: get_analyst_rating_actions for each firm's action history; get_analyst_estimates
for the consensus numbers.

Returns {"symbol", "consensus_rating", "firm_count", "analysis", "firms", "note"}.
- firms is [{rating_company, rating, prev_rating, action, date}], most recently active
  first; ratings are in each firm's own words.
- firm_count covers every firm that acted in the year up to the latest action, even when
  limit cuts the list.
- analysis is {date, consensus_rating, summary} or null. It can be months old (CSCO's is
  dated 2025-11-12): report its date, never present it as current.

An unknown symbol returns empty lists (never a 404): `note` is set only then. A 422
means a bad symbol or limit. A 401 means the sign-in expired (your MCP client re-runs
OAuth). Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min per user; counts toward plan quota.

Inputs: symbol (required), limit. Returns: note, firms, symbol, analysis, +2 more

get_company_snapshotA
Read-only
Inspect

Fetch a structured, POINT-IN-TIME company snapshot — no report generation needed.

Returns thesis/bull/bear, financial overview (Piotroski, valuation signal),
price performance + technical indicators, price targets, institutional
ownership, and analyst grades for `symbol`. Synchronous and cheap — prefer
this for a quick CURRENT read instead of generating a full PDF report.

*** POINT-IN-TIME ONLY — THIS IS NOT A TIME SERIES. *** It captures where the
company stands right now, not how it got there. Do NOT use it to answer
temporal / trend / "over time" questions (e.g. "how has X evolved over the
past year", "quarter-over-quarter trend", "activity over the last 12 months",
"since ..."). Each block is an independently-sourced current cut with its own
as-of date (e.g. the institutional-ownership block is the latest 13F holder
snapshot), so the blocks are NOT a comparable historical series — reading a
trend off them, or treating two blocks' as-of dates as the same instant,
produces spurious results. For anything time-series, historical, or
"how did this change", use `explore_data_catalogue` instead.

Scope caveat: the snapshot is a FIXED set of current blocks, not the full
catalogue. Absence of a data domain HERE does NOT mean Flexreport lacks it —
do not infer coverage gaps from this tool. Route "which symbols / values are
available" enumerations to `list_options` (instant), and "do you have data
on <topic>" questions that need actual data to `explore_data_catalogue`.

*** RUN IT AFTER `situate(symbols=[symbol])`. *** This tool gives the WHAT
(where the company stands); situate's event web gives the WHY (the events that
got it there, in order, and how they connect). The snapshot states that the
thesis shifted, the valuation signal changed, or ownership moved; it does NOT
say what caused any of it. So whenever the user asks about a company generally,
or follows a snapshot with "why?" / "what changed?", read both together: quote
the snapshot for the current position, and situate's web for the sequence that
explains it. Presenting a snapshot alone as the whole picture is the failure
mode — it reads as a verdict with no evidence.

Two honest limits when pairing them. (1) situate's web defaults to a 14-day
window; a driver older than that needs `window_days` widened (up to 90) before
you can say the snapshot is unexplained. (2) The blocks here carry their own
as-of dates — a 13F ownership block can be a quarter old, so the event that
explains it may sit well outside any window. Absence of a matching event is
NOT proof the snapshot moved for no reason.

Inputs: symbol (required). Returns: recent_news, price_targets, price_overview, company_summary, +3 more

get_document_sectionA
Read-only
Inspect

Open ONE numbered section of a source document — the exact earnings-call speaker turn a citation points at.

The other end of a `trace_data_sources` citation, and the finest grain the platform
serves: not the whole call, one turn of it. Use it to read the passage behind a
number before quoting it, and to quote a speaker verbatim with the citation intact.

Every argument comes off the citation you are following — a `transcript_section`
citation's URL is `/query-section?name=...&symbol=...&year=...&quarter=...&n=...`,
so read the four values out of it rather than deriving them. If you pulled the row
from `earnings_call_transcript_sections` yourself you already hold all four
(`symbol`, `year`, `quarter`, `section_no`); no text search is needed or wanted.

*** `year` and `quarter` are the FISCAL period of the CALL, never the calendar
quarter a report covers. *** For most covered companies those differ — the call
everyone calls "Q2 2026" is stored as FY2026 Q4 for one name and FY2027 Q1 for
another. Take the period from the citation, the transcript record, or `call_date`.
A 404 here ("no section N for SYM YEARqQ") is almost always this, not a missing
call: re-check the period before concluding the transcript is not covered.

Returns {"name", "symbol", "year", "quarter", "n", "format": "paragraph",
"count", "rows": [{symbol, year, quarter, call_date, section_no, speaker,
content}], "highlights": [...], "total_sections": N, "transcript_url": ...}.
`content` is the turn's text and `speaker` is who said it — attribute the quote to
that speaker, never to "the company". `total_sections` bounds `n`, so neighbouring
turns (n-1, n+1) are how you read a passage in context when it starts mid-answer.
`highlights` are quotes the platform's own analysis pipeline verified against this
section; they mark evidence inside it but are NOT necessarily the passage you are
citing — verify your own quote against `content`. `transcript_url` is frequently
null, so offer "view the full call" only when it is present.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: n (required), year (required), symbol (required), quarter (required), +1 more. Returns: n, name, rows, year, +7 more

get_earnings_historyA
Read-only
Inspect

One company's quarterly earnings reports — EPS and revenue actual vs estimate, surprise, beat/miss, EPS YoY — newest first, with the next scheduled report on top. The direct read for "did X beat last quarter", "X's beat/miss record", "when does X report next".

FLOW: pair with get_analyst_estimates for the forward consensus, company_financials for
the statements. get_earnings_season_cohort is the cross-company view of the current
season; predict_earnings_move sizes the next reaction.

Returns {"symbol", "limit", "count", "rows", "note"}, newest first. A row is {symbol,
date, status, timing, fiscal_year, fiscal_period, period_ending, eps_actual,
eps_estimated, eps_surprise, revenue_actual, revenue_estimated, revenue_surprise,
beat_flag, eps_yoy_change}.
- status is "upcoming" (the next scheduled report: actuals and surprises are null) or
  "reported". timing is "before_open", "after_close" or null.
- eps_surprise, revenue_surprise and eps_yoy_change are FRACTIONS (0.05 = +5%), not
  percents: multiply by 100 before showing a %.
- beat_flag is "beat", "miss" or "in_line".
- EPS is the adjusted (street) figure the estimate is made on, NOT the GAAP EPS in
  company_financials. Never compare eps_actual with company_financials' EPS.

An unknown symbol returns no rows (never a 404): `note` is set only then. A 422 means a
bad symbol or limit. A 401 means the sign-in expired (your MCP client re-runs OAuth).
Requires auth (your MCP client attaches the OAuth bearer automatically). Rate-limited
100/min per user; counts toward plan quota.

Inputs: symbol (required), limit. Returns: note, rows, count, limit, +1 more

get_earnings_season_cohortA
Read-only
Inspect

Each covered company's latest earnings result in the current earnings season — beat/miss, EPS and revenue vs estimate, EPS YoY — one row per symbol, newest first. The cross-company view: "who missed", "how are small-cap healthcare names doing".

Every filter is optional; filters given together are ANDed (e.g. sector="Healthcare" +
marketcap_type="Small-cap"). Unset filters are left out of the request.

Returns {"filters", "count", "rows", "note"}. A row is {symbol, sector, sp_index,
country, marketcap_type, date, eps_actual, eps_estimated, revenue_actual,
revenue_estimated, beat_flag, eps_yoy_change, cohort}.
- beat_flag is "beat", "miss" or "in_line".
- eps_yoy_change is a FRACTION, NOT a percent: 0.12 = +12%, -0.3 = -30%. Multiply by 100
  before showing it as a %. Null when there is no prior-year actual.
- cohort is "sp500" (S&P 500 member), "beyond_sp500_us" (US, outside the S&P 500) or
  "other" (non-US).

FLOW: filter here (e.g. beat_flag "miss" rows) -> list_ir_documents_season(symbol=...) for
those names' decks and press releases -> get_ir_document_analysis /
get_ir_document_content(url=document_url).

An empty result is a valid answer (nothing matches the filters), not an error: `note` is
set only then. A 422 means a filter failed validation. A 401 means the sign-in expired
(your MCP client re-runs OAuth). A 429 means the 100 requests/minute per-user limit (or
the plan quota) was hit. Requires auth (your MCP client attaches the OAuth bearer
automatically); counts toward plan quota.

Inputs: limit, sector, symbol, country, +2 more. Returns: note, rows, count, filters

get_event_ontologyA
Read-only
Inspect

The platform's event ONTOLOGY — what an event TYPE means for everything else. Call it FIRST on any real-time, single-company, or event-driven request; it is the map the other calls are planned from.

===> For a named company, `situate(symbols=[...])` returns the cards of the event
types in its web and the table cards they entail — start there. Call this tool
directly for the FULL card of an event type, a relation card, a whole family, or
the unfiltered graph.

===> REQUISITE for: any real-time / live-events request, any "what
happened / why / catch me up" question, and BEFORE aiming explore_data_catalogue or
generate_report_for_stock at a company whose situation is event-driven. Cheap,
synchronous, public, symbol-INDEPENDENT and cacheable — fetch once per event type
(or once unfiltered, ~230 KB) and reuse for the whole conversation.

Pass exactly ONE filter for a small card (~5-10 KB):
  event_type="eps_update"        one event type and the relations it entails
  relation="eod_stock_prices"    one table/view and the event types that entail it
  family="earnings"              every event type and relation in a family
No filter -> the whole class graph (21 event types, ~300 relations, 20 tools).
Event-web items (`type`) and situate web nodes carry the join keys verbatim: pass a node's
`type` as event_type, its `relation` as relation, its `family` as family.

An event_type card carries:
  about                    what the event is ABOUT: symbol | filer | strategy. A 13F
                           event is a FILER's action across N names — the symbol
                           you asked about is one of them.
  persisted_in             the durable table to read once the event has aged out
                           of the realtime cache (realtime_cache_ttl_hours, 12h) —
                           list_realtime_events returns [] after that; the data is
                           still there, in this relation.
  entails.<layer>          the relations WRITTEN by the same chain run (mined, with
                           run counts) plus every view above them (pg_depend),
                           bucketed base / silver / gold / dimension / analysis.
                           These are the tables that are FRESH because this event
                           fired — name them explicitly in explore queries.
  entails.realtime_events  event types that usually FOLLOW, each with rate,
                           median_lag_hours, lift, mode (trigger = dispatched by the
                           same chain, near-certain; sequence = world-ordered,
                           independently detected, probabilistic), certainty /
                           expected_within_hours when declared, and persisted_in.
  preceded_by              the inverse — what should ALREADY exist earlier in the web.
  episodes                 named world-order sequences (earnings, realtime_mover,
                           thirteen_f_cycle, news) with this event's position — the
                           whole shape of the situation from any one member.
  produced_by[].schedule   the workflow that publishes it, its cron, and
                           next_run_at (America/New_York).
  deepened_by              the tools that deepen this event once you have its payload.
  informs                  DOMAIN causality (news -> prices, earnings -> estimates):
                           what an analyst checks next. Declared and the WEAKEST
                           edge — never present it as lineage.
  evidence                 how many of these events the platform has seen.

A relation card carries: layer, family, cadence (update_frequency + prose),
derives_from / feeds (pg_depend), computed_from / computes (LLM and model writers),
refreshed_by[].schedule with next_run_at, read_by (the MCP tools that read it),
entailed_by (event types), informs.

THE FRESHNESS CHECK — the reason this tool exists: compare a web node's `at` with a
downstream relation's refreshed_by[].schedule[].next_run_at. If next_run_at is AFTER
the event, that relation does NOT reflect the event yet. Do not query it for the
reaction — use the intraday tools (detect_intraday_outlier_jumps,
get_aftermarket_data) or say the daily table lags.

Every edge carries `provenance` (mined | declared | pg_depend | static:tasks.py |
beat | catalogue | data_model), the same honesty axis as the web's `cause`: mined
and pg_depend are facts, declared is the platform's own judgment, informs is domain
intuition. Quote the grade when you lean on an edge. format="triples" returns raw
subject-predicate-object rows instead of cards. degraded=true means the table has
not been built yet, not that the type is unknown.

Inputs: family, format, relation, event_type. Returns: Cards format fills event_types/relations/episodes (plus families, tools); tripl…

get_insider_activity_summaryA
Read-only
Inspect

One company's insider buying and selling rolled up by quarter and by insider — counts, shares, dollar value, net, net-buy ratio, CEO/director activity, grants. The direct read for "are insiders buying or selling X", "who is selling".

FLOW: get_insider_transactions for the individual trades behind a quarter (pass `role`
to narrow to the CEO or directors).

Returns {"symbol", "quarters", "insiders", "note"}.
- quarters: [{quarter, buy_count, sell_count, buy_shares, sell_shares, buy_value,
  sell_value, net_value, net_buy_ratio, n_insiders, n_buyers, n_sellers, ceo_bought,
  ceo_sold, dir_buy_count, dir_sell_count, grant_shares, grant_count, first_txn_date,
  last_txn_date}], newest quarter first.
- insiders: [{insider_name, position, is_ceo, is_director, is_founder, is_ten_pct_owner,
  activity, buy_count, sell_count, buy_shares, sell_shares, buy_value, sell_value,
  net_value, net_buy_ratio, grant_shares, first_txn_date, last_txn_date}].
  insiders covers the last 6 months, largest net dollar value first.

READING THE NUMBERS: Buy/sell/net are open-market trades only, valued at market close;
net_buy_ratio runs -1 (all selling) to +1 (all buying). Grants are counted separately
(grant_shares, grant_count) and are not in buy/sell/net.

An unknown symbol returns empty lists (never a 404): `note` is set only when a list is
empty. A 422 means a bad symbol or limit. A 401 means the sign-in expired (your MCP
client re-runs OAuth). Requires auth (your MCP client attaches the OAuth bearer
automatically). Rate-limited 100/min per user; counts toward plan quota.

Inputs: symbol (required), limit. Returns: note, symbol, insiders, quarters

get_insider_transactionsA
Read-only
Inspect

One company's individual insider (Form 4) transactions — who bought or sold, how many shares, at what price, under a 10b5-1 plan or not — newest first. The direct read for "has X's CEO been selling", "insider buys at X".

Senior insiders only, last 6 months.

FLOW: get_insider_activity_summary first for the quarter-by-quarter picture and who
the net buyers/sellers are; then this for the trades behind a quarter. `sec_url` is the
filing.

Returns {"symbol", "side", "role", "count", "rows", "note"}, newest first. A row is
{transaction_date, filing_date, insider_name, position, is_ceo, is_director, is_founder,
is_ten_pct_owner, side, transaction_code, shares, filing_price, close_price, mkt_value,
shares_owned_after, is_10b5_1, direct_indirect, security, accession, sec_url, footnotes}.

READING THE NUMBERS:
- mkt_value is shares x that day's close for every side: for GRANT/EXERCISE/TAX_WITHHOLD
  it is market value, not money paid.
- footnotes carry weighted-average price ranges and 10b5-1 plan adoption dates; they are
  ~1 KB a row, so keep limit modest (CSCO default = 49 rows, 53 KB).

An empty result means no matching trades by senior insiders in 6 months, or an unknown
symbol (never a 404): `note` is set only then. A 422 means a bad symbol, side, role or
limit. A 401 means the sign-in expired (your MCP client re-runs OAuth). Requires auth
(your MCP client attaches the OAuth bearer automatically). Rate-limited 100/min per
user; counts toward plan quota.

Inputs: symbol (required), role, side, limit. Returns: note, role, rows, side, +2 more

get_ir_document_analysisA
Read-only
Inspect

The analyst's read of a company's most recent IR decks, the latest analysis per deck, with links to the exact pages it relied on — the direct read for "what did X's investor deck say".

Returns {"symbol", "count", "rows", "note"}, one row per deck. A row is {symbol,
document_url, source_url, title, doc_type, document_date, summary, key_takeaways,
reported_metrics, guidance_commentary, flags, cited_pages, page_number_url,
last_updated}.

These fields are a model's analysis of the deck, not quotes, so attribute them to the
analysis.

PROVENANCE: `cited_pages` lists the page numbers the analysis relied on, and
`page_number_url` gives a `document_url#page=N` link for each, in the same cited order.
Those links are the provenance for the analysis: WHEN YOU REPEAT A FIGURE OR CLAIM FROM
IT, CITE THE page_number_url link it came from. Both lists are empty when no pages were
cited, so say that analysis is uncited. To check a figure against the deck, call
get_ir_document_content(url=document_url) and read the matching `page_number`.

An empty result means no analyzed decks, not necessarily no decks: try
list_ir_documents. `note` is set only then. A 422 means a bad symbol or limit. A 401
means the sign-in expired (your MCP client re-runs OAuth). Requires auth (your MCP
client attaches the OAuth bearer automatically). Rate-limited 100/min per user; counts
toward plan quota.

Inputs: symbol (required), limit. Returns: note, rows, count, symbol

get_ir_document_contentA
Read-only
Inspect

The extracted text of one IR document, page by page — use it to open the pages an analysis cites, or to read a deck directly.

FLOW: take `document_url` from list_ir_documents or get_ir_document_analysis. A
`page_number_url` (document_url#page=N) works too: the `#page=N` is dropped before the
call and the whole document comes back, so read the page whose `page_number` is N.

Returns {"url", "count", "pages", "note"}. A page is {page_number, page_number_url,
char_count, content}. Cite a page's `page_number_url` when you repeat anything from its
`content`.

An empty result usually means the url is not a stored document_url (a `source_url`
will not match): `note` is set only then. A 422 means the url failed validation. A 401
means the sign-in expired (your MCP client re-runs OAuth). Requires auth (your MCP
client attaches the OAuth bearer automatically). Rate-limited 100/min per user; counts
toward plan quota.

Inputs: url (required). Returns: url, note, count, pages

get_ir_financial_tablesA
Read-only
Inspect

The financial tables extracted from a company's most recent IR decks: management's own slide figures (non-GAAP metrics, segment results, KPIs, guidance ranges), each cell linked to its deck page.

These are MANAGEMENT'S ADJUSTED, UNAUDITED DECK FIGURES, not reported GAAP numbers. For
GAAP line items (revenue, net income, EPS as filed) use company_financials.

Returns the backend response as is, nested symbol -> document -> page:
{SYMBOL: {"documents": [{document_url, fiscal_year, fiscal_period,
fiscal_reporting_period, pages: {page_number: [cell, ...]}}]}}. Each cell record
carries a `page_url` (the deck page it was read from) and a `column_label`. Values come
back as strings, exactly as extracted from the slide.

PERIODS: the period a cell refers to is in its `column_label`, NOT the document's
fiscal_year / fiscal_period, which only date the deck. One deck can show prior-period
comparisons and forward guidance side by side.

PROVENANCE: WHEN YOU REPEAT A FIGURE, CITE ITS `page_url`. To read the surrounding
slide text, call get_ir_document_content(url=document_url) and open that page.

FLOW: list_ir_documents (what decks exist) -> get_ir_financial_tables (the figures) /
get_ir_document_analysis (the analyst's read) -> get_ir_document_content (the pages).

An empty result means no extracted tables for those decks, not that the company
published none: try list_ir_documents. A 422 means a bad symbol, limit or fiscal_year.
A 401 means the sign-in expired (your MCP client re-runs OAuth). Requires auth (your
MCP client attaches the OAuth bearer automatically). Rate-limited 100/min per user;
counts toward plan quota.

Inputs: symbol (required), limit, fiscal_year.

get_latest_reportA
Read-only
Inspect

Get the latest Flexreport research report(s) for one or more tickers. USE THIS BY DEFAULT.

===> THIS IS THE DEFAULT, CORRECT TOOL whenever a user asks for "the report",
"research", "the latest research", "analysis", "a writeup", or "the PDF" for a
ticker (e.g. "get me the latest research on SNOW"). It is the FAST path, and it
only FETCHES: every material event writes the symbol's report as it happens, so
this returns the latest document in seconds, with metadata saying how current it
is. Nothing is built here. ALWAYS call this before `generate_report_for_stock`,
which writes a new note (a few minutes).

If the user's intent is an OPEN-ENDED or exploratory QUESTION rather than a request
for this existing report, do NOT use this tool — default to `explore_data_catalogue`
(fast, interactive), and reach for `generate_research_report` only when the user
EXPLICITLY asks for a full deep-dive writeup. A BESPOKE report ("the SNOW report,
but built around product revenue and RPO") is not a new note either: explore the
items the user named, ideate with them on the result sets, and lay the agreed
results out in their template (`get_user_template`) with your own document tooling.

Accepts one OR many symbols. Returns
{"result":    [{"symbol": "AAPL", "url": "<presigned pdf url>",
                "generated_at": "<iso utc>", "age_hours": 5.2,
                "latest_event_at": "<iso>", "stale": true,
                "template": "default"}, ...],
 "missing":   ["XYZ", ...],
 "stale_symbols": ["AAPL", ...],
 "rendering": {}}
Every symbol lands in exactly ONE of `result` / `missing`; `stale_symbols` lists the
`result` symbols flagged `stale: true`; `rendering` is always empty (kept for older
clients). `template` is "user" when the PDF is the caller's own copy in their saved
template, "default" for the platform layout. Split a list longer than 100 symbols
across calls.

THE PDF IS BEHIND `url`, not in this response: a presigned link valid ~6h from this
call.
  - To GIVE the user the report: hand them the link to open or download.
  - To READ it yourself: download the link (an HTTP / web fetch, or
    `curl -o <SYMBOL>.pdf "<url>"`) and open the PDF; a client that renders PDF
    pages also sees the charts. Quote the report from what you read, not from the
    metadata here.
  - The link serves the symbol's report file as it is when fetched. After ~6h, or
    to pick up a newer report, call this tool again for a fresh link; never edit
    or build a URL.
  - A client that cannot fetch a URL but can run code: download_pdf_from_url(url)
    returns the same PDF as base64 to decode.

READ EACH SYMBOL'S FLAG BEFORE YOU HAND ANYTHING OVER:
  stale: false   -> the PDF reflects the symbol's latest event. Serve it.
  stale: true    -> an event landed after this PDF (`latest_event_at` says when).
                    If that was only minutes ago, the event's own report is probably
                    still being written: say so, and fetch again in a few minutes
                    (or wait for its `report_plan` frame). Otherwise hand over the
                    PDF with that caveat and offer generate_report_for_stock(ticker),
                    which writes a new note in a few minutes. Start it when the user
                    wants it; never fan it out across a list of names unasked.
  stale: null    -> no report inputs are known for the symbol, so freshness cannot
                    be judged. Serve the PDF and quote `generated_at` / `age_hours`.
  in `missing`   -> no report yet. generate_report_for_stock(ticker) writes the first
                    one (a few minutes; later calls here return it) — say so before
                    starting it — or `onboard_symbol` if the ticker is not covered.
To see which symbols have a CURRENT report — by the event that produced it, across
the universe, before anything is pulled — use `list_available_reports`.

Rate-limited to 500/hour. Requires auth (your MCP client attaches the OAuth bearer
automatically).

Inputs: symbols (required). Returns: result, missing, rendering, stale_symbols

get_sector_price_performanceA
Read-only
Inspect

Price returns by sector over 1 day, 1 week, 1 month, 3 months, 6 months, 12 months and the year to date. Each row gives both the median company's return and the market-cap-weighted return. Use it for questions like "which sectors are leading this month" or "how has Energy done YTD, S&P 500 vs the rest".

Both filters are optional. sp_index=true covers only S&P 500 members, false covers only
companies outside the S&P 500, and leaving it out covers all of them. Unset filters are
left out of the request.

Returns {"filters", "count", "rows", "note"}, one row per sector. A row is {sector,
universe, as_of, n_symbols, median_return_1d … _ytd, mcap_weighted_return_1d … _ytd}
(windows 1d, 1w, 1m, 3m, 6m, 12m, ytd).
- Returns are in PERCENT, NOT fractions: 1.25 = +1.25%, -3.4 = -3.4%. Show them as they
  are; do not multiply by 100.
- The median shows the typical company. The market-cap-weighted figure is driven by the
  largest names. When the two differ a lot, a few mega-caps are carrying (or dragging)
  the sector.
- as_of is the date the returns are measured to. n_symbols is the number of companies
  behind the row.

FLOW: pair with get_sector_volume_performance to see whether a move came on rising volume.
Use get_earnings_season_cohort(sector=...) to find the companies behind a move.

An empty result is a valid answer, not an error: `note` is set only then. A 422 means a
filter failed validation. A 401 means the sign-in expired (your MCP client re-runs
OAuth). A 429 means the rate limit or the plan quota was hit. Requires auth (your MCP
client attaches the OAuth bearer automatically); counts toward plan quota.

Inputs: sectors, sp_index. Returns: note, rows, count, filters

get_sector_volume_performanceA
Read-only
Inspect

Share volume (shares traded) for US listings, by sector and market-cap bucket, over one-week, one-month, three-month, six-month and one-year windows. Each window also shows the change against the window before it. Use it for questions like "is trading in small-cap Tech picking up" or "where is volume drying up".

Every filter is optional. Filters given together are ANDed (e.g. sectors=["Technology"] +
marketcap_types=["Small-cap"]). Unset filters are left out of the request. limit counts
dates, not rows: each date has one row per sector and market-cap bucket matched.

Returns {"filters", "count", "rows", "note"}, one row per (date, sector,
marketcap_type). A row is {date, sector, marketcap_type, one_week, one_month,
three_months, six_months, one_year, one_week_pct, one_month_pct, three_months_pct,
six_months_pct, one_year_pct}.
- one_week … one_year are share volume over that window.
- *_pct is the PERCENT change against the window just before it of the same length (e.g.
  the last month vs the month before): 12.5 = +12.5%. Show it as it is; do not multiply
  by 100.

FLOW: pair with get_sector_price_performance to see whether price moves came on rising
or falling volume.

An empty result is a valid answer, not an error: `note` is set only then. A 422 means a
filter failed validation. A 401 means the sign-in expired (your MCP client re-runs
OAuth). A 429 means the rate limit or the plan quota was hit. Requires auth (your MCP
client attaches the OAuth bearer automatically); counts toward plan quota.

Inputs: limit, sectors, marketcap_types. Returns: note, rows, count, filters

get_signed_sql_drilldownA
Read-only
Inspect

Fetch the rows behind an event-web drilldown from its server-minted query token.

Some web nodes from `situate(symbols=[...])` carry `signed_query_url` in their `fetch` hint —
an opaque, tamper-proof link the backend minted for exactly that node. This tool is
the zero-planning rung of the chain: no query to compose, the rows come back
directly. Pass either the full `signed_query_url` or just its `t` parameter; the
URL form is unwrapped automatically. A token that came from a
SAVED request rather than the event web belongs to `run_saved_query` instead — same
endpoint, but it replays every query in the saved row in one call.

Returns {"format": "table", "count": N, "rows": [...]} — rows only, never the
underlying SQL. For contextual drilldowns the NEW record is flagged
`is_new_record: true` and the remaining rows are the prior/context records to read
it against (the node's `signed_query_context` describes what they are).

CITE WHAT YOU PUBLISH: the rows may carry `_source_*` columns — `_source_url`,
`_source_filed_at`, `_source_document_id`, `_source_citations` — and the response a
`sources` block naming each relation, its grain, and whether it is `traceable` per
"row" or only as a "cohort". That is the provenance of the numbers, not padding:
quote `_source_url` when the user asks where a figure came from, and for anything
you are about to publish — or the moment they ask for the filing, the quote, or
"how do you know" — pass `sources.relations[].relation` plus each row's
identifying columns (the grain AND its date) to `trace_data_sources`, which
resolves them to the source document, the
section, or the verified quote behind the number. `get_document_section` then opens
the exact speaker turn a transcript citation points at.

HTTP 403 means the token is invalid or tampered — do not retry with an altered
token; re-run situate for a fresh link instead.

`values` and `prompt` re-aim a token that is a PLACEHOLDER TWIN at other entities;
the response then carries `parameters` (what was substituted) alongside `rows`;
echo those to the user. A 422 means the request could not be
mapped onto the token's slots. The full slot vocabulary of a SAVED row lives in
`list_saved_queries` -> `metadata.parameters`, and replaying a saved row is
`run_saved_query`, not this tool.

An uncapped drilldown that fans out to constituents can return tens of thousands
of rows and stall the client for minutes — pass `max_rows`.

Requires auth (your MCP client attaches the OAuth bearer automatically). A
not-authenticated error means the sign-in lapsed; the fix is signing in, never a
different token.

Inputs: encrypted_query_token (required), prompt, values, max_rows. Returns: Rows behind a signed query token, never the SQL.

get_stock_picksA
Read-only
Inspect

Fetch the latest LLM-selected stock picks (current rebalance holdings).

Returns `picks`, the holdings selected for the most recent rebalance date — the names
the backend's strategies are currently positioned in. Each pick is a record (ticker,
strategy, weight, rebalance date, and related fields; values are strings).
Synchronous and read-only — no auth required.

Each holding also carries a CURRENT-BASKET YTD view: `ytd_return` (that stock's
Jan 1 -> now price return) and the strategy-level weighted `basket_ytd_return`.
For how the strategies have ACTUALLY performed since inception (the realized track
record of the book as held), use `get_strategy_performance_summary` /
`get_strategy_track_record` instead.

Inputs: strategy_name. Returns: picks

get_strategy_performance_summaryA
Read-only
Inspect

Leaderboard of since-inception performance vs the S&P 500 for all strategy books.

THE first stop for "how are the stock picks / strategies performing?". Returns
`strategies`, one headline row per book — the four strategies plus the pooled optimized book — sorted
by excess return over the S&P 500: {strategy_name, display_name, inception_date,
since_inception_return, sp_since_inception, excess_since_inception,
annualized_return, max_drawdown, sharpe, sp_sharpe, ytd_return, growth_strategy,
growth_sp, days_tracked}.

growth_strategy / growth_sp = what `amount` invested at inception would be worth in
the strategy vs the S&P 500.

Drill into one book's full daily series with `get_strategy_track_record`, or its
per-trade adds/drops with `get_strategy_swaps`.

Inputs: amount. Returns: strategies

get_strategy_swapsA
Read-only
Inspect

Per-trade swap ledger (adds/drops) vs the S&P 500 for ONE strategy book.

Answers "were the individual trades good?": across consecutive weekly rebalances,
an ADD is a name newly selected and a DROP a name removed. Each ADD is measured
from entry to its exit (or the latest close if still held); each DROP is the
FOREGONE return from its exit to the latest close. Both are compared to the S&P
500 over the same window.

Returns {strategy_name,
trades: [{symbol, action, event_date, window_end, still_open, name_return,
sp_return, excess}, ...] (newest first),
summary: {n_adds, n_drops, avg_add_excess_vs_sp, avg_drop_foregone_excess_vs_sp,
net_swap_value_add}}.

For the book-level return series use `get_strategy_track_record`.

Inputs: strategy_name (required). Returns: book, trades, summary, strategy_name

get_strategy_track_recordA
Read-only
Inspect

Since-inception daily track record vs the S&P 500 for ONE strategy book.

Returns the realized performance of the book as actually held — chartable series
plus headline stats: {strategy_name, book, inception_date, amount_invested,
summary: {since_inception_return, sp_since_inception, excess_since_inception,
annualized_return, max_drawdown, sharpe, sp_sharpe, ytd_return, growth_strategy,
growth_sp, days_tracked, last_date},
series: [{date, strategy_cumulative, benchmark_cumulative, excess, strategy_ytd,
growth_strategy, growth_sp, sharpe_expanding, holdings_count}, ...]}.

The Sharpe series is expanding-window and annualized (rf=0).

Backend returns 404 when the chosen book has no performance history yet. For the
cross-book leaderboard use `get_strategy_performance_summary`; for the current
holdings themselves use `get_stock_picks`.

Inputs: strategy_name (required), book, amount. Returns: book, series, summary, strategy_name, +2 more

get_task_statusA
Read-only
Inspect

Poll the status of an async job (generate_report_for_stock, generate_research_report, explore_data_catalogue, explore_data_coverage, draft_custom_dataset, screen_stocks, ...).

Returns {"task_id": ..., "status": ..., "result": ...}. `status` is one of
PENDING, SUCCESS, FAILURE, RETRY. `result` is populated once status is SUCCESS.

A result over ~8 MB is not returned (it would take the server down): the call errors.
Re-run the job scoped narrower (tickers, dates, a row limit in the wording) instead of
polling it again.

Inputs: task_id (required).

get_technical_indicator_dataA
Read-only
Inspect

Fetch a historical technical-indicator series for a symbol over a date range.

Call `list_options("technical_indicators")` first for valid indicator names. An
unknown symbol returns 404 and an unknown indicator returns 400 listing valid values.

Returns `rows`, one record per trading day ordered by date (columns beyond
date/symbol/close vary by indicator), or an empty list when there's no data in the range.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: symbol (required), end_date (required), indicator (required), start_date (required). Returns: rows

get_transcript_analysisA
Read-only
Inspect

One company's call-over-call earnings transcript analysis: the call's summary and what it added, removed, strengthened, weakened or reinforced against the prior call — the direct read for "what changed on X's call", "what did management stop talking about", and how the narrative has moved.

===> Prefer this over explore_data_catalogue, and over reading the transcript turn by
turn, for what a call said: it is synchronous and returns the rows directly. For the
guidance label alone, use `get_transcript_guidance`.

FIELDS, per row: `summary`, then `added`, `removed`, `strengthened`, `weakened` and
`unchanged_but_reinforced`, each against the PRIOR call. They are a model's analysis
of the transcript, not quotes: attribute them to the analysis, and quote only from
`source_urls[].quotes` or the transcript itself. `date` is the CALL date, not a fiscal
period.

CITATIONS: an `[n]` marker in the text resolves to the `source_urls` entry with the same
`n`: {n, url, title, quotes, node_id}. `quotes` are verbatim passages, and the `url`'s
symbol, year, quarter and n are the arguments to `get_document_section`, which opens that
speaker turn. Year and quarter there are FISCAL; take them from the url, never from
`date`. Only some calls have citations stored (none before May 2026): elsewhere
`source_urls` is null and the text has no markers. Say that text is uncited analysis:
trace_data_sources has no link for those calls either.

`limit` COUNTS ROWS, NOT CALLS: a re-analyzed call can appear twice, on the same date or
a day apart, with near-identical text. Treat those as one call. Rows with citations run
about 15 KB each, so keep the default unless the question compares calls.

Returns {"symbol": ..., "count": N, "rows": [...]}, newest call first. `note` is set
only on an empty result.

Errors: a 404 means the ticker is outside coverage.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 500/min.

Inputs: symbol (required), limit. Returns: note, rows, count, symbol

get_transcript_guidanceA
Read-only
Inspect

One company's guidance label call by call (RAISED, INLINE, REVISED DOWNWARDS or NOT_PROVIDED) — the direct read for "did X cut guidance" and how its guidance posture has moved call over call.

===> Prefer this over explore_data_catalogue for one company's labels: it is synchronous
and returns the rows directly. It takes one symbol, so a market-wide question ("who
raised guidance this season") belongs in explore_data_catalogue.

LABELS:
  RAISED             management explicitly raised the outlook or signalled stronger
                     forward expectations
  INLINE             reaffirmed or maintained the prior outlook, or gave fresh guidance
                     consistent with consensus or the prior trajectory. Also the label
                     when signals truly balance out
  REVISED DOWNWARDS  cut, lowered, walked down to the low end, or signalled weaker
                     forward expectations
  NOT_PROVIDED       no forward guidance, withdrawn with no replacement, or the call's
                     analysis is silent on the outlook

A label is a model's judgment of the call's narrative analysis, not a comparison of
guidance numbers, and it is the DOMINANT signal when a company raised one metric and
cut another. Before you publish one, or to say what was actually guided, read the same
call's `get_transcript_analysis`.

Returns {"symbol": ..., "count": N, "rows": [{"symbol", "date", "guidance_outlook",
"last_updated"}]}, newest call first. `date` is the CALL date, not a fiscal period. The
newest row may be from last quarter if this quarter's call has not happened yet, so
check its date before calling it current. A re-analyzed call can rarely hold two labels
a few days apart: treat them as one call and say so if they differ. `note` is set only
on an empty result.

Errors: a 404 means the ticker is outside coverage.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 500/min.

Inputs: symbol (required), limit. Returns: note, rows, count, symbol

get_user_dataset_fileA
Read-only
Inspect

Read the rows of one of the user's saved datasets AS PUBLISHED — the file behind its latest_url, or a dated version. THIS is how a dashboard or an answer reads a dataset: the published file is reviewed at publish, point-in-time, and the same bytes every consumer gets. Never replay the dataset's saved query instead (run_saved_query re-runs live SQL: different rows, no review). A claude.ai artifact can't reach flexreportfinapi.com itself, so its page calls this tool.

Fetches the file server-side and parses json, jsonl, csv, tsv, xml, rss and atom files
into rows; rss/atom come back one row per item {title, link, description, pub_date,
guid, categories, company_symbols, research_url}. `research_url` (every format, rows
with a ticker) is the feed readers' research link: show it as part of the item, but
never fetch it or offer it as a way to download a report (get_latest_report is the
user's route). parquet and xlsx files can't be parsed here: give the user latest_url
instead.

Returns {dataset_name, format, version, published_at, row_count, rows}. Quote
`published_at` as the data's as-of. A file over the server's size cap errors instead
of returning — use the user's own reader on latest_url for that one.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: dataset_name (required), version.

get_user_templateA
Read-only
Inspect

Return the PDF template this user has saved, or a 404 if they have none.

Call it to answer "what format am I on?", BEFORE `save_user_template` when a
template may already exist (saving replaces it without history, so the user
should know what they are overwriting), and whenever you are about to compose
a PDF yourself from Flexreport data: lay the content out in this markup so the
document matches the user's format. A 404 there is the cue to offer drafting
one (`draft_user_template` -> previews -> `save_user_template`).

Returns {"template_type", "template_format", "anchor", "template", "created_at",
"updated_at"}. `template` is the sanitized markup as submitted (up to 200 KB) —
the compiled blueprint the backend renders from is not returned. To change the
format, draft again and pass the chosen variant to `update_user_template`
rather than editing this text blind.

An HTTP 404 means no template is saved — the standard layouts are in force. An
HTTP 503 means the backend's user_templates table has not been created yet, NOT
that nothing is saved; report that difference.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min.

Inputs: no named parameters. Returns: anchor, template, created_at, updated_at, +2 more

is_market_openA
Read-only
Inspect

Check whether an exchange is currently open — a cheap routing helper.

Returns `is_open`, a single boolean. An unknown exchange code is an error.

Use it to route between the market-hours tools: when the market is CLOSED,
extended-hours data lives in `get_aftermarket_data`;
when OPEN, `detect_intraday_outlier_jumps` gives the live intraday read.
No auth required.

Unsure which exchange a ticker trades on? `get_company_snapshot` returns an
`exchange` field whose value can be passed here as-is.

Inputs: exchange. Returns: is_open

list_available_reportsA
Read-only
Inspect

List the symbols with a report plan SAVED on or after report_date (default: TODAY) — the real-time research get_latest_report can hand over right now, and whether each is current or has a newer event since.

A plan is saved the moment a material event publishes for a symbol (eps_update,
eps_release, 8k_release, financials_release, ir_publication, transcript_update) and
nightly for company_update. This tool is the INVENTORY of those plans — it does not
build or return a report. Returns `plans`, newest plan first:
  {"plans": [{"symbol": "NVDA", "event_type": "eps_release",
              "planned_at": "<iso>",   # when the plan was built
              "queued_at": "<iso>",    # the report inputs (the event) it was built from
              "fresh": true,           # see below
              "source": "redis"}, ...]}  # redis = built within 3 days, s3 = older durable copy
`fresh` applies the SAME rule get_latest_report (/get-cached-reports) applies:
  fresh: true  -> the report get_latest_report([ticker]) returns was written from
                  this plan and reflects the latest event. These are the names to pull.
  fresh: false -> a newer event landed after the plan. Its own report may still be in
                  progress (minutes); otherwise get_latest_report returns the older PDF
                  flagged stale, and generate_report_for_stock(ticker) writes a new
                  note in a few minutes. Say so before the user waits on it.
  not listed   -> no plan IN THE WINDOW. An empty result does not mean there is no
                  research — it means nothing was planned in the window. Widen
                  `report_date` before concluding a symbol has no plan; only then is
                  a first generate_report_for_stock note (a few minutes) the answer
                  (or `onboard_symbol` if the ticker is not covered).

TWO WAYS IN:
  1) Event-first — list_realtime_events(event_type=...) shows what just published; call
     this with event_types=[<that type>] to confirm which of those symbols have a plan
     and which are fresh, then get_latest_report(symbols=[...]) for the ones the user
     wants. (An event in the 12h cache with no plan here means the plan is still being
     built — check again in a minute.)
  2) Research-first — skip the events step: call this with no filter for every symbol
     planned TODAY, grouped by the event that triggered it. Plans stay listed for 7
     days, so pass report_date="YYYY-MM-DD" (e.g. 3 days back) when the user wants the
     running inventory rather than today's, or when today's list comes back thin.

PICKING THE MOST PERTINENT PLANS ("pull the most relevant reports today", "what's worth
reading right now"): the list is an inventory, not a ranking — a nightly company_update
plan sits next to a transcript that just landed. Rank by the EVENT, not by the plan:
  a) FILTER on what published — list_realtime_events for the material types
     (transcript_update, 8k_release, ir_publication, eps_release / eps_update,
     financials_release) and for the tape (biggest_mover, biggest_loser,
     biggest_gainer). A symbol on BOTH lists — a filing or call AND a move — is
     the strongest candidate.
  b) ANALYZE the content — read the event payloads (what the 8-K discloses, what the
     call said, what the deck guides to) and keep the ones that change something;
     get_event_ontology(event_type=...) says what each type means.
  c) CONFIRM with intraday price action — detect_intraday_outlier_jumps(tickers=[...])
     (and get_aftermarket_data after the close) shows whether the market treated it
     as significant; a print with no reaction ranks below a mover with a filing.
  d) MATCH to plans — call this tool with event_types=[<the types from a>] and keep
     the candidates that appear, preferring `fresh: true`; `queued_at` should be the
     event you just read.
  e) PULL the winners — get_latest_report(symbols=[...]) for the few that survived,
     not the whole list: every one comes back in seconds, flagged fresh or stale.
     Tell the user which is which, and offer generate_report_for_stock (a few minutes
     each) only if they want to wait.

Not `get_latest_report`: that PULLS the reports for named tickers (each one's latest
document). This tool answers "for which symbols could
I get a fresh report?" — by event, across the universe — before anything is pulled. Not
`generate_research_report`: that is the broad, topical, or multi-company writeup;
the plans listed here are single-symbol, event-anchored reports.

Synchronous, cheap (500/hour). Requires auth (your MCP client attaches the OAuth
bearer automatically).

Inputs: event_types, report_date. Returns: plans

list_earnings_announcementsA
Read-only
Inspect

List scheduled earnings announcements within a date window, Flexreport names only.

Omit both dates for "who reports today". Results are restricted to Flexreport's
covered universe, so symbols outside coverage are dropped silently.

The optional filters are AND-ed together. `sector`, `industry`, and `market_cap` are
validated against fixed enums server-side; invalid values return a 422, so source them
from the tools named in their descriptions rather than guessing.

Returns `announcements` (empty list when nothing matches); values are strings and
"nan" means not available yet.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: sector, symbols, end_date, industry, +2 more. Returns: announcements

list_ir_documentsA
Read-only
Inspect

A company's investor-relations documents (decks, presentations), newest first — the inventory step before reading what a deck said.

FLOW: list_ir_documents -> get_ir_document_analysis (the analyst's read, with the pages
it cites) -> get_ir_document_content(url=document_url) for the page text.

Returns {"symbol", "count", "rows", "note"}, newest first. A row is {document_url,
symbol, title, doc_type, fiscal_year, fiscal_period, published_date, page_count,
content_type, source_url, last_updated}. `document_url` is the stored copy that
get_ir_document_content takes; `source_url` is where the company published it. They are
not interchangeable.

An empty result means no stored documents, not necessarily that the company publishes
none: `note` is set only then. A 422 means a bad symbol or limit. A 401 means the
sign-in expired (your MCP client re-runs OAuth). Requires auth (your MCP client attaches
the OAuth bearer automatically). Rate-limited 100/min per user; counts toward plan quota.

Inputs: symbol (required), limit. Returns: note, rows, count, symbol

list_ir_documents_seasonA
Read-only
Inspect

Investor-relations documents (earnings presentations and press releases) published or ingested this earnings season, across companies, newest first — "which decks came out this season", or the decks for names picked from get_earnings_season_cohort.

Every filter is optional; filters given together are ANDed. Unset filters are left out of
the request.

Returns {"filters", "count", "rows", "note"}. A row is {document_url, symbol,
company_name, sector, industry, country, sp_index, marketcap_type, in_coverage_universe,
document_date, published_date, ingested_at, doc_type, title, source_url, fiscal_year,
fiscal_period, page_count, pages_extracted, has_extracted_text}.
- Symbols are NOT limited to the coverage universe: in_coverage_universe = false marks
  companies outside it (other tools may have little or nothing on them).
- Rank recency on document_date. published_date is mostly null.
- doc_type is "earnings_presentation" or "press_release".
- document_url feeds get_ir_document_content(url=document_url); source_url is the
  company's IR-site link and is not interchangeable. has_extracted_text = false means
  there is no page text to read yet.

FLOW: get_earnings_season_cohort -> list_ir_documents_season -> get_ir_document_analysis
(the analyst's read) / get_ir_document_content(url=document_url) (the pages).

An empty result is a valid answer (nothing matches the filters), not an error: `note` is
set only then. A 422 means a filter failed validation. A 401 means the sign-in expired
(your MCP client re-runs OAuth). A 429 means the 100 requests/minute per-user limit (or
the plan quota) was hit. Requires auth (your MCP client attaches the OAuth bearer
automatically); counts toward plan quota.

Inputs: limit, sector, symbol, country, +2 more. Returns: note, rows, count, filters

list_optionsA
Read-only
Inspect

Enumerate the valid values for a parameter, straight from the backend.

Call this BEFORE guessing a parameter value. `kind` selects which catalog; three
kinds are scoped by a query parameter (`ticker`, or `q` / `cik` / `manager_type`) and
refuse the call without it:

- "event_types"                  -> valid `event_type` for `list_realtime_events`
                                    (eps_update, company_update, biggest_mover, ...)
- "financial_items"              -> standardized EDGAR line items ("revenue",
                                    "operatingIncome") for a CUSTOM report's
                                    `financial_items` (`generate_report_for_stock`,
                                    or a scheduled "create-full-report" step)
- "financial_ratios"             -> EDGAR ratios ("grossProfitMargin") for that
                                    report's `ratios`
- "as_reported_items"            -> NEEDS `ticker`. The filer's OWN tagged XBRL
                                    concepts from its 10-Q / 10-K filings — {concept,
                                    statement_type, label, standard_concept,
                                    latest_period, facts} — for a custom report's
                                    `as_reported_financial_items`
- "revenue_segments"             -> NEEDS `ticker`. The filer's revenue segments as
                                    tagged in its filings — {product_label,
                                    product_member, product_axis, concept,
                                    latest_period, facts} — for a custom report's
                                    `revenue_segment` (pass the product_label).
                                    A name lookup only: never sum members across it
- "institutional_managers"       -> NEEDS `q` (name fragment, e.g. "berkshire"),
                                    `cik` (SEC CIK, any width) and/or `manager_type`
                                    (from "institutional_investor_types"). Managers as
                                    {cik, name, category, current_portfolio_value},
                                    largest first. The value is the 13F cover-page total,
                                    not AUM, and can include options. Page with `limit`
                                    and `offset`. Pass the `cik` values, never the names,
                                    to get_13f_position_changes, get_13f_cik_allocation
                                    or a custom report's `institutional_ownership`
- "sectors"                      -> valid `sector` filter values
- "institutional_investor_types" -> investor CATEGORIES (not managers) — the keys
                                    `screen_stocks(institutional_ownership=...)`
                                    filters on, and the `manager_type` values for
                                    "institutional_managers" and
                                    get_13f_ownership_by_manager_type
- "countries"                    -> covered countries
- "fiscal_quarter"               -> the most recent fiscal quarter being reported
- "market_cap"                   -> valid `market_cap` buckets (Small-cap,
                                    Medium-cap, Large-cap, Mega-cap)
- "intraday_frequency"           -> supported intraday chart frequencies
- "technical_indicators"         -> indicator names accepted by
                                    `get_technical_indicator_data` (rsi, macd,
                                    sma_50, ...); an unknown indicator there
                                    returns a 400 listing this set
- "tickers"                      -> the full covered symbol universe as bare
                                    symbols — equities PLUS ~420 market indices
                                    as caret-prefixed symbols (^GSPC, ^VIX, ...).
                                    NOTE: thousands of names — a large payload
- "tickers_with_names"           -> {symbol, company_name} pairs for the company
                                    universe ONLY — market indices are NOT in
                                    this list, only in "tickers" (an even larger
                                    payload)
- "data_feeds"                   -> the datasets `download_dataset` accepts, as
                                    {dataset, description, returns ("rows" or
                                    "download_links"), date_field, event_types
                                    (valid filter, null = unsupported)}. Call this,
                                    not download_dataset (3 calls/week), to answer
                                    "what feeds are there"

Returns `options` (the values for that kind). Authoritative and never stale: it
reads the backend's live config, not a hardcoded list. Public — no auth required.

Inputs: kind (required), q, cik, limit, +3 more. Returns: kind, options

list_realtime_eventsA
Read-only
Inspect

Pull live market events from the backend's Redis-backed cache (12h TTL).

===> Call `situate(...)` FIRST. With symbols, its web says which event types fired
for the company and when — a node older than the 12h cache returns [] here; its
payload lives in the card's `persisted_in` table instead. With no symbols, its
`order` says which types to read and its `cache.count` per type says which are
empty before you call (0 = cold cache, not "nothing happened").
`list_options("event_types")` enumerates the valid type strings. `event_type` is REQUIRED and
has no default on purpose: the type is the whole question, and a default
would answer a different one (eps_update is one slice of the earnings
family, not the family).

Then CONNECT THE DOTS: fetch the type asked about and follow the situation
across its related_events with follow-up calls narrowed by `tickers=[...]`
to the symbols just seen — e.g. eps_update -> check the intraday tape
(detect_intraday_outlier_jumps) -> 8k_release -> ir_publication. One hop
answers most questions; two covers a full earnings cycle. An unfiltered
follow-up call re-pulls the whole cache.

Returns `events`, a list of event objects (keys vary by type). An EMPTY list
means the cache is cold for that event type (12h TTL), not that nothing happened.

A material event here (eps_update, eps_release, 8k_release, financials_release,
ir_publication, transcript_update) means the symbol's report is being written from
it (within minutes; the `report_plan` topic announces each one):
`list_available_reports(event_types=[<this type>])` says which are already current,
and get_latest_report returns them in seconds.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: event_type (required), sector, tickers, industry, +1 more. Returns: events

list_s1_sectionsA
Read-only
Inspect

The sections of a company's latest S-1 that hold key passages, in document order — the table of contents to read before company_s1.

===> Call this BEFORE company_s1 and pass the section names you need as
company_s1(symbol, sections=[...]). A full passages read runs to about 390 KB;
this is a few KB.

Returns {"symbol", "count", "sections": [{section, start_page, end_page, passages,
accession_no, form, filing_date}]}. `passages` counts the key passages in the
section, so it also says how large a sections-filtered read will be. Only the
LATEST S-1 / S-1/A is listed; accession_no / form / filing_date say which one.

Errors: a 404 means no S-1 is stored for the symbol. Public, no auth.

Inputs: symbol (required). Returns: note, count, symbol, sections

list_saved_queriesA
Read-only
Inspect

List the data requests you have saved with save_user_query, newest first.

The entry point to the replay flow: check HERE FIRST, before running
`explore_data_catalogue` for any exploration question — a saved row that matches
the question, exactly OR in shape, means the answer is seconds away via
`run_saved_query` instead of a ~1-5 minute planning job.

Returns {"count": N, "saved_queries": [{"id", "user_request", "queries",
"query_placeholder", "metadata", "created_at", "updated_at"}, ...]}, the calling
user's rows only.

MATCH ON `metadata`, NOT ON THE LABEL. `metadata` describes what the row actually
asks. It is authored after the save and is null until the placeholder task has run
(roughly 10 s to 5 minutes, depending on the size of the queries):
  `summary`        one line with the slots in braces, e.g. "13F positions of
                   {managers} in {symbol}, {date_prior} vs {date_latest}: shares,
                   value, weight, QoQ change"
  `parameters`     [{name, type, description, example}] — the slot schema, one
                   vocabulary across every query in the row. These names are the
                   keys of `run_saved_query(values=...)`.
  `entities`       {slot: resolved example} — what the row was saved for
  `datasets`       the public dataset names the row reads (the same names
                   `explore_data_coverage` reports)
  `topics`         classifier topics for the saved request
  `result_schema`  [{index, summary, slots, columns}] — per query, what its result
                   set holds
  `stale`          true when a query no longer plans (checked nightly)
  `run_count`, `last_run_at`
Match the user's question against `summary` + `parameters` + `datasets`, NOT
against `user_request` — that is only the label the user typed while saving. SKIP
any row marked `stale: true`. For a row whose `metadata` has not landed yet, fall
back to the label and replay `queries` exactly.

Having picked a row:
  - EXACT repeat (same entities, same window) -> `run_saved_query(query_tokens=
    <the row's `queries`>)`; it replays as saved.
  - SAME SHAPE, other values (saved "the past 8 quarters of sales for TGT"; asked
    "KSS's last 8 quarters of sales") -> `run_saved_query(query_tokens=<the row's
    `query_placeholder`>, values={...})`, the values keyed by
    `metadata.parameters`; add a `prompt` only for slots you cannot type.
  - Pick WHICH of the row's queries to run from `result_schema`: the ones that
    answer the question, leaving the `_constituents` companion out — it is a
    7,000-35,000 row payload. Pass `max_rows` (e.g. 500) whatever you run.
  - TELL THE USER which saved row is being reused (its `summary` and `entities`)
    and which values were substituted (the replay's `parameters`).
A row that is merely close in TOPIC but asks a different thing is a DIFFERENT
question; confirm with the user before replaying it.

The other fields:
  - `queries` is the list of opaque query tokens for an exact replay.
  - `query_placeholder` is the list of placeholder-twin tokens, index-aligned with
    `queries`, or null while the placeholder task has not run yet (replay
    `queries` exactly or list again shortly). Never show a token of either kind to
    the user: it is ciphertext, not content, and says nothing about what the query
    does.
  - `user_request` is the user's own label — worth quoting when you say which row
    you reused, but not what to decide on.
  - `id` is what `delete_saved_query` takes.

Duplicate `user_request` values are possible — saving does not upsert.

An HTTP 503 here means the backend's saved-queries table has not been created yet,
NOT that the user has nothing saved — report that difference rather than an empty
list.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min.

Inputs: limit. Returns: count, saved_queries

list_scheduled_tasksA
Read-only
Inspect

List the caller's scheduled tasks (cron jobs created via schedule_task).

Returns `tasks`, only the authenticated user's jobs, each as
{"name", "active", "schedule" (cron string), "args", "kwargs", "enabled",
 "last_run_at", "total_run_count"}. Workflow schedules are named
"wf:{email}:{workflow-name}"; dataset builds (save_user_dataset) are
"ds:{email}:{dataset-name}". Use `name` as the key to remove a job with
`delete_scheduled_task`.

Inputs: no named parameters. Returns: tasks

list_sub_industriesA
Read-only
Inspect

List the sub-industries within one or more sectors.

Returns `industries`, the distinct industries used to narrow
`list_realtime_events(industry=[...])`.

Inputs: sectors (required). Returns: industries

list_user_datasetsA
Read-only
Inspect

List the user's own saved datasets (from save_user_dataset) with their build status and download links to the published files.

New items are reviewed before publishing, up to 40 per build (on a large first build
the rest publish as queried and are reviewed on later builds; a failed review publishes
the items as queried). The review can correct text from stored sources, add a one-line
caveat, or hold an item out; links, GUIDs, tickers and dates are never changed. So a
file can hold fewer rows than the query returns, and an item already published
unreviewed can later be corrected or withdrawn.

Returns {count, datasets: [{name, user_request, output_schema, file_format,
date_mode, cron, task_name, last_built_at, last_build_status, last_row_count,
latest_url, files: [{run_date, published_at, url}]}]}. `latest_url` is the fixed,
sign-in-free link to the newest file — the one to give for "what's my feed URL?" (an rss
file's items carry <company:symbol> and <category> for syndication partners). To read a
file's rows (a dashboard, a summary), call get_user_dataset_file. Rows with a symbol or
ticker carry `research_url`, the feed readers' sign-in-free research link — never call
it or offer it as a download (the user's own reports come from get_latest_report).
`last_build_status` is written,
unchanged (same rows as the last file, so no new file), empty, too_large (over 500k
rows), schema_drift (columns no longer match the saved schema — re-draft and re-save
under the same name) or failed.

Each file `url` is a presigned link valid 12 HOURS: hand it to the user as a link; never
fetch the file into the chat or store the link. Not rate-limited beyond the plan
quota. Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: end_date, start_date, latest_only, dataset_name. Returns: count, datasets

load_user_relevant_toolsA
Read-only
Inspect

The Flexreport tools this user relies on most. Consider this as one of your first steps to create a personalized and consistent experience for the user. New users might not have any history. Empty responses can be expected.

Inputs: no named parameters. Returns: as_of_date, relevant_tools

manage_billingAInspect

Get a link to the Stripe billing portal where the user can view invoices, update their card, or cancel their subscription. Use when the user asks to manage, change, or cancel their billing/subscription.

Inputs: no named parameters. Returns: url, usage, message

onboard_symbolAInspect

Request onboarding of a NOT-yet-covered ticker (mutating, authenticated).

Kicks off a 30-60 min backend workflow and emails the authenticated user when
the first report is ready. Rate-limited to 5/hour per user. Use only when a
symbol is missing from `list_options("tickers")` / returns no data elsewhere.


Returns {"task_id": ..., "status": "PENDING"}.

Inputs: symbol (required). Returns: status, task_id

optimize_portfolioAInspect

Build a risk-optimized portfolio from a non-empty list of tickers.

Scores `symbols` with the multi-signal scorer, LLM-curates, and risk-optimizes.

Rate-limited to 10/hour
per user server-side.

Asynchronous: returns {"task_id": ..., "status": "PENDING", "supported": [...],
"not_supported": [...]}. Poll `task_id` with `get_task_status` until SUCCESS.

Inputs: symbols (required), delivery, risk_tolerance. Returns: status, task_id, supported, not_supported

optimize_portfolio_defaultA
Read-only
Inspect

Build a risk-optimized portfolio from a list of tickers — fast, synchronous, no LLM.

THE DEFAULT optimizer route. Returns the result directly and almost instantly
(no task id, no polling). Reach for `optimize_portfolio` instead only when you
explicitly want the slower LLM-curated variant layered on top of the optimizers.

Symbols are validated against the covered universe; unsupported tickers come back
in `missing`, and in-universe tickers with too little price history come back in
`dropped`.

No auth required (public endpoint).

Synchronous. Returns:
  {"status": "OK",  # or "SKIPPED"/"EMPTY" when too few usable symbols remain
   "holdings": [{"symbol", "source_strategies", "summary", "conviction_level"}, ...],
   "optimizer_results": {"mvo": {...weights+diagnostics}, "hrp": {...}, "mcvar": {...}},
   "risk_profiles": {"profiles": [...], "recommended": "..."},  # present only when status == "OK"
   "dropped": [...],   # in-universe but insufficient price history
   "missing": [...]}   # not in the covered universe

Inputs: symbols (required), risk_tolerance. Returns: reason, status, dropped, missing, +5 more

predict_earnings_moveA
Read-only
Inspect
Predict how big a stock's move will be when it next reports earnings. For each symbol, returns
its next earnings date (today or later) and `expected_move`: the expected absolute move of the
reaction session as a log return (0.05 is about 5%; size only, no direction). For context,
`hist_move_mean` / `hist_move_n` give the stock's own average reaction over its past reports and
how many reports that covers. Symbols with no scheduled report come back in
`no_upcoming_earnings_symbols`; uncovered tickers in `not_supported_symbols`.

Inputs: symbols (required). Returns: predictions, not_supported_symbols, no_upcoming_earnings_symbols

register_event_subscriptionAInspect

Save a realtime-event filter server-side and get a subscription_id whose stream resumes where the last read stopped (POST /register-subscription).

For a live-streaming ask, the default is a dashboard (in Claude, an Artifact) that
loops stream_events itself — see stream_events. Register a subscription when the
user wants a saved filter that resumes across sessions.

Returns {subscription_id, filter, cursor, created_at}. `filter` echoes the
normalised filter (topics lower-cased, symbols upper-cased, duplicates dropped);
`cursor` is the position the subscription starts from — only events published
AFTER registration are ever delivered. KEEP the subscription_id: there is no list
endpoint yet, and it is what stream_event_subscription and
delete_event_subscription take.

`topics` / `symbols` as in stream_events: event types and families from
list_options("event_types") plus the stream-only `report_plan` topic; an empty
body listens to everything. Same vocabulary rules — `report_plan` for "stream
full research as it is minted", a family for "everything earnings-related",
symbols for a watchlist. 30 registrations/hour per user; delete what you no
longer need. The stream keeps ~2,000 entries (several days at current volume): a
subscription idle longer than that resumes at the oldest entry and may have
missed events.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: topics, symbols. Returns: cursor, filter, created_at, subscription_id

run_saved_queryA
Read-only
Inspect

Re-run a saved request's queries against live data — exactly, or re-aimed at other entities with typed values. No planning, no polling.

The payoff of `save_user_query`: pass a saved row's `queries` array from
`list_saved_queries` and each stored query runs as-is, returning fresh rows
synchronously. Use this INSTEAD of `explore_data_catalogue` whenever a saved row
already covers the question — same SQL, current data, seconds instead of minutes,
and it does not draw on the 20/hour exploration budget.

A full signed URL is accepted in `query_tokens` and unwrapped. For a token
that came from a situate web node rather than a saved row, use
`get_signed_sql_drilldown` — same endpoint, single node, drilldown framing.

`values` slots are substituted deterministically, with no language model in the
loop (~0.5-1.2 s per query). Reach for it whenever you already know the entities —
you usually do, having resolved the tickers or CIKs before calling — and keep
`prompt` for what you cannot type.
  - Entity-set slots (type `cik_rows` / `symbol_rows`) take a LIST of {"id",
    "name"} objects: [{"id": "0001454027", "name": "Verition Fund Management LLC"}].
    A name-only entry ({"id": "", "name": "Walleye Capital"}) is resolved
    server-side against the filer registry; a name it cannot resolve comes back as
    a 422, never as a guess.
  - Pass the SAME dict to every token of a row: each twin picks out the slots it
    uses, and keys no twin uses come back as `ignored_values`.
  - A slot left out falls back to `prompt`, and then to the value the row was
    saved with (reported as `defaulted_parameters`).

`prompt`: a plain `queries` token has no slots and replays unchanged. The backend
maps the wording onto the row's typed slots. A 422 means it could not — fall back
to `explore_data_catalogue` for that question. A prompt-only fill can also DRIFT (a
slot the wording never mentions, a date say, can come back re-aimed), which is the
second reason to prefer `values`: never infer the substituted values from the
wording, read them out of `parameters` and say them back to the user.

`max_rows`: uncapped, a saved row's
`_constituents` companion query returns 7,000-35,000 rows (3-8 MB) and the client
stalls for minutes. A sliced result carries `row_count` (the full count) and
`truncated: true`; say the user is seeing a slice of N rows.

Returns {"queries_run": N, "results": [{"index": i, "format": "table",
"count": <rows returned>, "rows": [...], ...}, ...]}, in the SAME ORDER as
`query_tokens`. A re-aimed replay adds, per result:
  `parameters`            the values actually substituted (resolved ids and
                          canonical names)
  `defaulted_parameters`  slots that kept the saved example ("prior quarter kept
                          as 2026-03-31")
  `ignored_values`        keys in `values` this twin does not use
Surface all three: which values were substituted, which kept the saved example,
which were ignored. Rows only — the underlying SQL is never returned, by design.
Describe the results from the row's `metadata.summary`, the substituted
parameters, and the columns, never by asserting what the query does internally.

CITE WHAT YOU PUBLISH: each entry in `results` may carry `_source_*` columns —
`_source_url`, `_source_filed_at`, `_source_document_id`, `_source_citations` —
alongside a `sources` block naming each relation, its grain, and whether it is
`traceable` per "row" or only as a "cohort". That is the provenance of the numbers,
not padding: quote `_source_url` when the user asks where a figure came from, and for anything
you are about to publish — or the moment they ask for the filing, the quote, or
"how do you know" — pass `sources.relations[].relation` plus each row's
identifying columns (the grain AND its date) to `trace_data_sources`, which
resolves them to the source document, the
section, or the verified quote behind the number. `get_document_section` then opens
the exact speaker turn a transcript citation points at.

Each token runs independently: one failure does not stop the rest, and that entry
carries an "error" key instead of rows. A 403 means that token is invalid or
tampered — do not retry it altered; the saved row is dead, so re-run
`explore_data_catalogue`, `save_user_query` a fresh row, and `delete_saved_query`
the old one. A 422 on a re-aimed replay is the mapping failure above (unknown
entity, wrong shape), not a dead row.

A replay returning DIFFERENT rows than when it was saved is normal — it hits live
data. Report what comes back now; never reconcile it against remembered numbers.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: query_tokens (required), prompt, values, max_rows. Returns: results, queries_run

save_user_datasetA
Idempotent
Inspect

Save a drafted candidate as the user's scheduled dataset (step 2 of 2, after draft_custom_dataset): its query, the schema it produces, the file format, the date mode and a cron schedule. Each build publishes a new file only when the rows changed; list_user_datasets returns the files.

New items are reviewed before publishing, up to 40 per build. On a large first build
the rest publish as queried and are reviewed on later builds; a review that fails
publishes the items as queried. The review can correct text from stored sources (a
cut-off sentence, a fiscal period missing from a title), add a one-line caveat, or hold
an item out of the file (junk, misattributed, off-topic, materially wrong). Links,
GUIDs, tickers and dates are never changed, and no figure is published that isn't in
the stored data. So a file can hold fewer rows than the query returns, and an item
already published unreviewed can later be corrected or withdrawn when its review runs.

RSS files (format="rss"; Atom is unchanged) carry what syndication partners (e.g.
Newstex) read:
- `<company:symbol>EXCHANGE:TICKER</company:symbol>` per item, from a `company_symbol`
  / `ticker_exchange` column, else from `symbol` plus its listed exchange; non-US
  venue suffixes are dropped (BARC.L -> LSE:BARC).
- Up to 10 `<category>` tags per item, from `categories`, `category`, `event_type`,
  `document_type`, `doc_type`, `sector` and `industry`.
- One item per guid: a document listed under several tickers is one story carrying
  every ticker.
- The channel carries the title "Flexreport Finance: <name>" and one `<copyright>`
  line; each item's description ends with a "Source: Flexreport Finance" line.
- Each item's description carries a "Research: Flexreport Finance research report"
  link to its `research_url` (atom: a rel="related" link as well).
- JSON source links are unwrapped to their URL.

Every format gets a `research_url` column when the query returns `symbol` or `ticker`:
a fixed, signed link (no sign-in) serving the research report PDF behind that item,
added at build after the review. It exists ONLY so the feed's readers (syndication
partners, the owner's subscribers) can open the research without a Flexreport account:
never call it, build one, or offer it as a download route (reports for the user come
from get_latest_report, Flexreport's daily files from download_dataset). The link is
the entitlement: anyone holding the feed can open the reports in it, and deleting the
dataset kills every link it published. When the user plans to share the feed, tell
them that anyone holding it can open the reports in it.

Confirm the name and schedule with the user before calling. Any valid cron is accepted
(hourly, every 30 minutes, ranges), but one expression can't give each hour a different
minute: for 9:30 and 20:00 offer "0,30 9,20 * * *" (also 9:00 and 20:30) or two
datasets. Limits: 5 datasets per user, and 10 schedules per user shared with
schedule_task workflows.

Errors: 404 = that query_token is not a candidate of the caller's own draft; 422 = bad
cron, a limit reached, a column named `published_at` (reserved — refine the draft to
rename it), or the candidate no longer runs (draft it again); 503 = the dataset saved
but its schedule didn't attach — call this again with the same args.

Returns {dataset_id, dataset_name, saved_query_id, task_name ("ds:{email}:{name}"),
cron, format, date_mode, schema: [{name, pg_type}], feed_fields, latest_url,
placeholder_id_to_poll, build_task_id}.
- `latest_url` is a FIXED link to the newest file with no sign-in (the link itself is
  the key): give it to the user as THE feed URL — for an RSS reader, a syndication
  partner's poller (rss items carry <company:symbol> and up to 10 <category>), Excel /
  Google Sheets web import, or another platform's poller. A dashboard reads the
  published file through get_user_dataset_file, never a replay of `saved_query_id`. It returns 404 until the first
  build writes a file; with build_now that usually takes minutes.
- `feed_fields` (rss/atom only) shows which column fills each item field {title, link,
  description, pub_date, guid}; tell the user if one fell back (null).
list_user_datasets(dataset_name=...) shows the build's last_build_status. The schedule
appears in list_scheduled_tasks as `task_name`; delete_scheduled_task(task_name)
stops the builds but keeps the dataset and its files; delete_user_data_feed removes
the dataset entirely.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: cron (required), draft_id (required), date_mode (required), query_token (required), +3 more. Returns: cron, format, schema, date_mode, +8 more

save_user_queryAInspect

Save the queries an exploration already planned, so the request can be replayed instantly — exactly, or re-asked for other entities.

THE POINT: `explore_data_catalogue` is a full validate -> plan -> run pipeline that
re-authors the SQL from scratch on every call (~1-5 min, 20/hour). For a question
the user will ask AGAIN — a recurring check, a dashboard they watch, "my usual
semis screen" — save the tokens that exploration just produced. `run_saved_query`
then re-runs exactly those queries against live data in seconds, with no planning
step and no async job to poll. The backend ALSO authors a PLACEHOLDER twin of each
saved query (its ticker, CIK list, date, interval, and count lifted into typed
slots) plus a `metadata` slot schema naming them, so the same request can later be
re-asked for a different company, filer, or window:
`run_saved_query(query_placeholder, values={"symbol": "KSS"})`.

WHEN TO CALL: once an exploration is done and shown, offer it — say the request can
be re-run exactly or with different values — and save when the user says yes or
clearly implies they will want it again. Do NOT save every exploration by reflex,
and do not save a one-off.

Each query token is opaque ciphertext the server minted around the planned SQL.
NEVER write, guess, or edit one — a token this backend did not mint cannot be
decrypted and fails with 403 at replay time, long after the exploration is gone.

Owner-scoped: the row belongs to the calling user and is invisible to everyone
else. There is NO upsert (unlike `schedule_task`): saving the same request twice
creates a SECOND row. Check `list_saved_queries` first and `delete_saved_query` the
stale one rather than piling up near-duplicates.

Returns {"msg": "Successfully saved query: <user_request>", "id": <row id>,
"placeholder_status": "PENDING" | "NOT_DISPATCHED", "placeholder_id_to_poll"}. `id` is the delete key.
PENDING means the placeholder twins AND the row's `metadata` (its slot schema,
summary, and datasets) are being authored — roughly 10 s to 5 minutes, depending on
the size of the queries. Until they land, `query_placeholder` and `metadata` are
null in `list_saved_queries`, and an exact replay via `queries` works meanwhile.
NOT_DISPATCHED means no twins will be authored for this row: it can be replayed
exactly but not re-aimed.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min.

Inputs: query_tokens (required), user_request (required). Returns: id, msg, placeholder_status, placeholder_id_to_poll

save_user_templateA
Idempotent
Inspect

Save the user's PDF format — one template per account, applied automatically to every PDF the backend renders for them from now on.

STEP 2 OF 2 after `draft_user_template`. Two ways to call it:

SIGNED-OFF (the normal path): pass `draft_id` and the `variant_id` the user chose
from the previews. The EXACT treatment they looked at is stored — no second
adaptation pass that could produce something they never saw. `template`,
`template_type` and `anchor` are taken from the draft and may be omitted. A 404
means the draft expired (24h) or the variant does not exist: draft again.

DIRECT (no previews): pass `template` + `template_type` (+ `anchor` for an
add_on) — only when the user explicitly wants to skip the previews. An add_on
saved this way still gets an unreviewed harmonise pass, so prefer the signed-off
path for anything visual. HTML only: markdown is rejected with a 422.

ONE TEMPLATE PER USER — this is an UPSERT: saving replaces whatever was saved
before, with no history. Call `get_user_template` first and confirm with the user
before overwriting an existing format. To change a saved format afterwards, use
`update_user_template` (any field, or none to recompile it as stored).

WHAT CHANGES AFTERWARDS: the backend lays out this user's reports in the saved
format — every event-time report gets a copy in their template (get_latest_report
serves it, `template: "user"`), as do scheduled reports. The template is a blueprint (stylesheet, page chrome, one
pattern per content kind) applied to the document's own content: nothing is
filled in by hand, and no other call changes. When you compose a PDF yourself
from Flexreport data, `get_user_template` returns the markup to lay it out in.

Asynchronous: returns {"task_id", "status": "PENDING", "next_step"}. Poll
`get_task_status(task_id)`; the finished result is {"status": "SAVED",
"template_type", "anchor", "bytes", "patterns": [content kinds the design styles],
"tones": {positive | negative | neutral | accent: css class}, "warnings"}. Tell
the user which content kinds their design styles. A warning "keeping the
previously compiled blueprint" means the new compile was rejected and the
previous blueprint stays in force; the markup itself is still saved. Validation
failures are a 422 with `detail.errors` listing each problem.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min.

Inputs: anchor, draft_id, template, variant_id, +1 more. Returns: status, changed, task_id, next_step

schedule_taskAInspect

Save a multi-step WORKFLOW (upsert by name) and attach a recurring cron schedule for its delivery.

Use this when the user wants a sequence of platform calls delivered ON A
SCHEDULE / repeatedly (e.g. "every weekday morning pull 8-K releases, screen
for cheap large-caps, and email me the overlaps as a table"). For a ONE-OFF
request, call the corresponding tools directly instead. A request worded as a
"datafeed" / "feed" / recurring file is draft_custom_dataset, not this — even
with summary columns, since stored summaries are ordinary dataset columns.

`steps` (shape in the parameter description): a transform applies its
instruction to the accumulated results of ALL prior steps (e.g. "intersect the
two event sets by symbol and build a table"), and each step's `label` keys its
result. The LAST step's output is what gets delivered, so end table/summary
workflows with a transform.

Allowlisted fetch endpoints (anything else is rejected with a 422 at save
time; `params` takes the same keys as the matching tool):

- POST, JSON-body params: "get-realtime-events" (`list_realtime_events`),
  "list-upcoming-earnings-announcements" (`list_earnings_announcements`),
  "predict-earnings-announcement-move" ({"symbols": [...]}),
  "data-catalogue-exploration" ({"query": "..."}).
- GET, scalar query params only (no lists/dicts): "get-company-snapshot"
  (requires {"symbol": "..."}), "get-strategy-performance-summary",
  "get-strategy-track-record", "get-strategy-swaps", "get-stock-picks",
  "list-tickers", "list-realtime-event-options", "get-sectors",
  "get-sub-industries".
- EXPENSIVE — max 2 per workflow, and the cron must use a literal minute and
  at most 4 literal hours (no sub-hourly / "*" fields): "screen-stocks"
  (`screen_stocks`), "generate-research-report" ({"query": "..."}),
  "create-full-report" (writes a new note every run, a few minutes, replacing
  the symbol's report; {"ticker": "..."} for the standard note;
  add "user_override": true plus the shaping lists `generate_report_for_stock`
  takes — financial_items, ratios, as_reported_financial_items, revenue_segment,
  technical_analysis_items, estimate_items, institutional_ownership CIKs — for a
  custom one; the backend rejects the lists without the switch),
  "optimize-symbols", "optimize-portfolio", "list-optimized-stock-picks".

Each user may hold at most 10 active schedules.

Returns `status` 201 (created) or 200 (updated) with `workflow_id` and
`task_name` ("wf:{email}:{name}"), the key that `list_scheduled_tasks` shows
and `delete_scheduled_task` takes.

Inputs: name (required), steps (required), regular_cron (required), delivery, +1 more. Returns: cron, name, status, scheduled, +2 more

screen_stocksAInspect

Screen stocks by financial growth, sector, sub-industry, market cap, analyst ratings, institutional ownership, country, and price performance.

Discover valid filter values with the list tools named in each parameter's
description before guessing.

Rate-limited to 10/hour
per user server-side.

Asynchronous: returns a task id. Poll it with `get_task_status` until SUCCESS.

Inputs: metrics, sectors, countries, market_cap, +4 more. Returns: status, task_id

situateA
Read-only
Inspect

THE FIRST CALL. What is going on right now — for named companies, or for the whole market — from the backend's situation endpoints. Call it before any other flexreport tool on anything about a company, an event, or "now".

Both scopes also return `your_tools`: the tools this user relies on most, most used
first (absent for a new user). When several next steps fit, prefer those.

TWO SCOPES (each parameter's description says which it belongs to):

WITH symbols -> GET /situate-company, one call per symbol. For "catch me up on
X", "what happened at X / why", "how did X's quarter look", and BEFORE aiming
explore_data_catalogue, list_realtime_events or a report tool at a company. When
the question is about one event, pass it as `event_type` AND `card_types` (halves
the payload: the cards of every other present type are dropped):
  situate(symbols=["OKTA"])                                           catch-up
  situate(symbols=["MAR"], event_type="financials_release",
          card_types=["financials_release"])                         the 10-Q
Returns {"situations": {SYMBOL: situation}} (a symbol that failed carries
{"error"} instead):
  present_types   event types with a node in the window
  web             {nodes, edges}: the newest node per event type and per table
                  over window_days. Edges carry `cause`: same_chain_run (observed:
                  one chain run wrote both — a table linked this way to the event
                  REFLECTS it), lineage (declared), co_occurrence (temporal only,
                  never causation). `at` is a write time, not a business date.
                  Node `fetch` hints name the follow-up call; a signed_query_url
                  goes to get_signed_sql_drilldown verbatim.
  cards           event-type cards: persisted_in, sources, entails (tables written
                  by layer, and realtime events that follow with rate and lag),
                  preceded_by
  relations       table cards: layer, refreshed_by (schedule, next_run_at), and
                  read_by — THE TOOL THAT READS IT. Prefer the first tool there
                  over explore_data_catalogue (company_financials for the EDGAR
                  statements, get_company_snapshot, predict_earnings_move, ...).
  entailed        tables the events entail, routed to this company's EDGAR or FMP
                  side; edgar_filer / routed_out / source_routing say which side
                  (never query a routed_out table for it)
Then: a node still inside the 12h cache -> list_realtime_events(event_type,
tickers=[symbol]); older -> its card's persisted_in table. For a table that
refreshed for the event, call its read_by tool first, e.g.
company_financials(symbol, financial_type=<the table>, limit=5, line_items=[...]).
A table whose next_run_at is after the event still shows the prior period. An
empty web is not a quiet week: widen window_days.

NO symbols -> GET /situate-market. For "any earnings today?", "most significant
investor decks today", "which hedge funds exited?", "what's going on?". Name the
types yourself when you can (`event_types`, else `family`); otherwise pass the
user's words as `question`:
  situate(event_types=["ir_publication"])        decks today: step 1 = decks
  situate(family="earnings")                     the earnings episode in order
  situate(question="what's going on?")           a sweep: one entry per episode
Returns {shape, routed_from, order, types, event_types, market, ...}:
  shape           named_types | family | sweep (nothing named: no default family)
  routed_from     what decided the order: `by` = explicit | question | none
  order           up to 4 event types, in reading order
  types[T]        card (trimmed ontology card: persisted_in, followers, ...),
                  cache {count, newest_at, oldest_at, tickers — or members with
                  member_kind cik | strategy | singleton}, reports {fresh, stale,
                  report_date}
  event_types     the whole realtime corpus (type, family, description)
  market          exchange, is_open, session
  degraded_sources  realtime_cache / report_inventory when one was unreachable:
                  counts are then unknown, NOT zero
Then: list_realtime_events(event_type=T, tickers=[...]) in `order`, skipping a
type whose cache.count is 0 (the 12h cache is cold for it — say so; it is not
evidence nothing happened). Narrow every follow-up with tickers=[...] to the names
just seen. For the research on the names that stand out, take the types that carry
`reports` into list_available_reports(event_types=[...],
report_date=<types[T].reports.report_date>), then get_latest_report. A family with no realtime types returns `message` naming
its durable tables.

Skip this tool ONLY for pure enumeration (list_options), an explicit "get me the
existing report" (get_latest_report), or a metric-history question with no event
in it ("Micron EPS over 8 quarters" -> company_financials(symbol="MU", limit=8,
line_items=["epsDiluted"]); cross-company or non-statement history ->
explore_data_catalogue). get_event_ontology gives any full card.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: family, symbols, question, sections, +8 more.

stream_eventsA
Read-only
Inspect

Listen for realtime events as they publish — a bounded read of the backend's ad-hoc SSE stream (GET /events), filter passed inline, nothing saved server-side.

DEFAULT DELIVERY — BUILD A DASHBOARD: when the user asks to stream / watch / keep
listening for live events, build a live dashboard (in Claude, an Artifact) whose
page calls this tool in its own loop, carrying `cursor` from read to read, and
renders each event as it lands. One prompt then keeps the stream open with no agent
turn per read. If the page cannot reach this server, run the loop yourself and write
each event into the dashboard's shared store. Stream into chat only when the user
asks for that, or the client cannot render a dashboard.

Returns {"events": [...], "cursor": "<last id seen>", "closed": null | reason,
"elapsed_seconds": n}. Each item in `events` is the same object `list_realtime_events` returns for that
type ({event_type, symbol, payload, published_at, id}) — summary, thesis impact,
significant changes, citations — the moment it publishes, no polling of the 12h
cache. There is NO PDF link on an event: the event's report lands a few minutes
later, announced on the `report_plan` topic, and get_latest_report([symbol]) then
returns it (stale or missing with no report on the way -> generate_report_for_stock,
ticker only).

THE LOOP: a call returns after `max_events` matched events or `max_wait_seconds`
(cap 55 s), whichever comes first — call it again to keep listening, and ALWAYS
pass the returned `cursor` back in: this stream keeps no state, so without it
the next call starts at "now" and drops whatever published in between. The
cursor advances on heartbeats too (events the filter dropped), so an empty
`events` list with a moved cursor is normal on a quiet tape. Omit `cursor` on
the first call to start at now. For a subscription that resumes by itself, use
register_event_subscription + stream_event_subscription instead.

`topics` (optional, any mix; case-insensitive):
  - an event type from list_options("event_types") — eps_update, 8k_release,
    transcript_update, ir_publication, biggest_mover, 13f_new, strategy_update, ...
  - a family from the same listing — earnings, news, market_movement,
    institutional_ownership, analyst_activity, strategy, prediction — which
    matches every type in it, including types added later;
  - `report_plan` (stream-only): a frame each time a symbol's new report is
    PUBLISHED — its document is already written ({symbol, event_type, planned_at,
    queued_at, plan_key, report_key}); the next step is get_latest_report([symbol]),
    which returns it (`stale: false`). Subscribe to it to stream research as it is
    written.
`symbols` (optional): tickers; 13f_* filer events carry the filer's CIK in the
symbol slot. No topics and no symbols = everything. Unknown topic -> 422 with the
allowed lists in `detail`.

`closed` set means the server ended the stream — do not reconnect with that id.
Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: cursor, topics, symbols, max_events, +1 more. Returns: closed, cursor, events, elapsed_seconds

stream_event_subscriptionA
Read-only
Inspect

Read the next events on a saved subscription — a bounded read of GET /event-subscription/{subscription_id} that resumes from the position saved when the previous read closed, so repeated calls see every matching event exactly once with no gap and no replay.

For a live-streaming ask, the default is a dashboard (in Claude, an Artifact) that
loops stream_events with its cursor — see stream_events; a page should prefer that
ad-hoc stream, since a subscription read can stall.

Returns {"events": [...], "cursor": "<last id seen>", "closed": null | reason,
"elapsed_seconds": n} — same shape and event objects as stream_events. A call returns after `max_events`
matched events or `max_wait_seconds` (cap 55 s); call again to keep listening. The
API saves the cursor when this read closes the connection, so the next call resumes
correctly WITHOUT passing `cursor`. Pass `cursor` only to override the saved
position for one connection (e.g. re-read from an earlier frame id); it is not
persisted.

An empty `events` list means nothing matched in the window, not that the
subscription is broken. `closed` = "subscription deleted" means it was removed
mid-stream — do not reconnect. 404 `unknown subscription_id` covers both a missing
id and another user's id (indistinguishable by design).

Acting on what arrives: an `event` item is the full realtime event (use it
directly); to hand over research, get_latest_report([symbol]) first (it returns in
seconds; batch up to 50 symbols per call), and only if it comes back stale/missing
with no report on the way a generate_report_for_stock(ticker) note. A `report_plan`
item means the symbol's new report was just published: get_latest_report([symbol])
returns it.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: subscription_id (required), cursor, max_events, max_wait_seconds. Returns: closed, cursor, events, elapsed_seconds

trace_data_sourcesA
Read-only
Inspect

Resolve numbers you are holding back to the documents they were read from — the filing, the section, or the verified quote.

The CITATION rung of the chain. `explore_data_catalogue`, `run_saved_query` and
`get_signed_sql_drilldown` hand back rows; this says where each number CAME FROM.
Reach for it whenever the user asks "where does that come from", "which filing",
"can you cite that", "how do you know" — and unprompted before you publish a figure
they are going to act on.

TWO WAYS IN, and the FIRST is preferred:
  1. `relation` + `keys` — `relation` is a name off the result's
     `sources.relations[].relation`; `keys` is one JSON object per row you want
     traced. Pass EVERY identifying column the row carries — the reported grain
     AND the period/date — e.g. [{"symbol": "SNOW", "cik": "0001273087",
     "date": "2026-06-30"}]. Extra columns are ignored; a missing one is fatal.
     Grain alone is NOT always enough: the join behind a view can need a column
     its `grain` does not list (current_institutional_holders_v reports grain
     [symbol, cik] but joins on `date` too, and keys without it resolve nothing).
     No token and no SQL, so this is the form
     that works when you assembled a table across several calls (`run_saved_query`
     issues one call per saved token, so a token only ever describes a fragment of
     what you ended up with) or filtered the rows yourself. Trace the rows you will
     actually cite — a few dozen — not the whole result set.
  2. `encrypted_query_token` — a `trace_token` from a `sources` block, or the
     original `query_token` / `signed_query_url`, for the "I have a link and
     nothing else" case. The URL form is unwrapped automatically. Tokens are minted
     server-side only: never construct, guess or edit one, and never pass SQL here.

THREE CITATION GRAINS come back, finest first. Which one answers depends on the
relation and you do not choose it — one surface over several stacks:
  - `citations` carrying `quotes` — the passages an analysis row was actually
    WRITTEN from, with quotes machine-verified against the section text. The
    strongest evidence in the system; quote these verbatim.
  - `citations` of kind `transcript_section` — a link to ONE numbered speaker turn
    of an earnings call. `get_document_section` fetches that turn's text.
  - `documents` — the whole source document (SEC 13F / Form 4 / 8-K / 10-Q / 10-K,
    an earnings-call transcript, an IR PDF) a number was read from. The fallback,
    and available wherever lineage reaches a document at all.
`providers` names which of those answered, and every relation's traceability is
derived from the live data model — a redefined view re-derives its own on the next
refresh, so trust this response over anything remembered.

READ `traceable` BEFORE YOU WRITE. "row" means each row maps to one document and
may be cited that way. "cohort" means the number is a sum over a SET of filings:
the response carries `cohort` instead of `documents`, only the set can honestly be
cited, and writing "per this filing, hedge funds own 4.1%" off a cohort row is the
exact failure this field exists to prevent. "none" means the lineage reaches no
document — say the number cannot be sourced rather than reaching for a plausible
filing. A `reason` of "no_keys" means a column the join needs was missing
from every key object — nearly always the period/date — not that the number is
unsourced. Add the date and any other identifying column on the row, and re-call.

`company_financials` rows: relation = the row's financial_type; keys = symbol, date,
statement, line_item for the standardized tables, symbol, line_item, current_period
for edgar_financials_yoy_change_m. Which keys the as-filed edgar_10q / edgar_10k /
edgar_eight_k tables need is unresolved (whole rows return no_keys) — cite the
standardized row instead, or quote the as-filed row's own filing_url.

`column` traces ONE column instead of the whole row — necessary for a YoY or
change relation, where each value column resolves to a DIFFERENT filing (the
result's `sources.relations[].per_column` says which columns work this way).

`resolve_passages=True` fetches the speaker turn or filing section text instead of
just a link — a link is already a citation. `values` and `prompt` re-aim a
placeholder-twin token but cannot change WHICH documents come back for a given set
of rows.

Requires auth (your MCP client attaches the OAuth bearer automatically). A 403 means
the token is invalid or tampered — re-fetch the link rather than retrying an altered
one; a 422 means neither `relation`+`keys` nor `t` arrived in a usable form.

Inputs: keys, column, prompt, values, +4 more. Returns: Polymorphic by relation: documents, citations (finest), or a cohort.

update_user_templateA
Idempotent
Inspect

Change your saved PDF template — any field, or none to recompile it as stored.

Complements `draft_user_template` (preview), `save_user_template` (create) and
`delete_user_template` (remove). Every argument is optional; a field you omit
keeps its stored value, and the result is compiled into a blueprint again:
  - a VISUAL change: draft the new page with `draft_user_template`, show the
    previews, then pass the chosen `draft_id` + `variant_id` here (both or
    neither);
  - a change without previews: pass `template`, `template_type` and/or
    `anchor` directly (HTML only — markdown is rejected with a 422);
  - NO arguments: recompiles the stored template with the current compiler —
    how a saved design picks up an improved compile without resubmitting it.

Async: returns {"task_id", "status": "PENDING", "changed": [the fields that
were updated], "next_step"} — poll `get_task_status` for {"status": "SAVED",
"patterns", "tones", "warnings"}. A 404 means nothing is saved yet (use
`save_user_template` first); a 422 lists validation errors in `detail.errors`.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Inputs: anchor, draft_id, template, variant_id, +1 more. Returns: status, changed, task_id, next_step

upgrade_planAInspect

Get a secure link for the user to upgrade or change their Flexreport Finance plan (e.g. to raise their request limit). Returns a checkout link — the user completes payment in their browser. Call this whenever the user asks to upgrade, subscribe, pay for, or change their plan, or when they've hit a usage/quota limit.

Inputs: no named parameters. Returns: url, usage, message

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Servers

    Try in Browser

    Glama MCP Gateway

    Add one secure layer between your agents and this server.

    Resources