query_flow_logs
Read the bot execution log (flow_execution_log) — the record of what the runtime actually did, and the only place that separates "the action ran" from "the action produced output". Read-only; requires the view_logs permission. Two modes: without groupBy it returns the newest matching rows, with groupBy it returns a grouped rollup ("what is failing right now") — group by error for distinct failures, action for which step, flow for where, day for whether it is new, then re-run with the same filters and no groupBy to read the rows behind a group. The window is always bounded: it defaults to the last 24 hours and cannot exceed 30 days. For one contact's history, get_contact_activity with includeFlowRuns is the narrower read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| botId | No | Only this bot's rows. Omit for every bot in the application. | |
| level | No | Only rows at this level. `ERROR` is the usual starting point. | |
| limit | No | Rows (max 200, default 50) or groups (max 100, default 25) to return. | |
| action | No | Exact action name, as it appears in the `action` field of a returned row. | |
| flowId | No | Only rows produced while running this flow. | |
| search | No | Substring match on the message or the error message. | |
| blockId | No | Only rows produced by this block. | |
| endDate | No | End of the window, ISO 8601. Defaults to now. | |
| groupBy | No | Return a rollup grouped by this dimension instead of raw rows. | |
| contactId | No | Only rows for this contact — one person's trace through the bot. | |
| startDate | No | Start of the window, ISO 8601. Defaults to 24 hours before endDate. | |
| applicationId | No | Application (workspace) id. Optional: an application-scoped key (app_...) defaults to its own application, but a personal key (usr_...) has no default and omitting it fails with MCP_APPLICATION_REQUIRED. Call list_applications to get the id. |