Skip to main content
Glama

query_flow_logs

Read-only

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 14 days. For one contact's history, get_contact_activity with includeFlowRuns is the narrower read. Rows are redacted: URL query values read ?param=***, HTTP request and response bodies keep their first 200 characters, and SECRET variable values read ******** — a masked value is not a missing one. Besides runtime rows, each deploy writes compile warnings (level WARNING, metadata.stage "compile", action = the kind): config_key_dropped, trigger_config_invalid, start_trigger_blank_command_catch_all, start_trigger_event_unreachable, start_rule_operand_unwritten, listener_triggers_ignored, condition_rules_stored_shape, owner_consistency, http_literal_credential, flow_link_loop. Runtime warnings to search for: variable_not_found, attachment_dropped, blank_button_dropped, reply_answer_mismatch, node_ref_unresolved (the run stopped at a step the published bot does not contain), and a message that was not sent (metadata.deliverySkipReason: owner_not_linked, owner_unreachable, peer_empty, dm_no_subject, target_unsupported).

Input Schema

NameRequiredDescriptionDefault
botIdNoOnly this bot's rows. Omit for every bot in the application.
levelNoOnly rows at this level or worse: `WARNING` returns warnings and errors, and is the usual starting point (a failed send is a warning).
limitNoRows (max 200, default 50) or groups (max 100, default 25) to return.
actionNoExact action name, as it appears in the `action` field of a returned row.
flowIdNoOnly rows produced while running this flow.
searchNoSubstring match on the message or the error message.
blockIdNoOnly rows produced by this block.
endDateNoEnd of the window, ISO 8601. Defaults to now.
groupByNoReturn a rollup grouped by this dimension instead of raw rows.
contactIdNoOnly rows for this contact — one person's trace through the bot.
startDateNoStart of the window, ISO 8601. Defaults to 24 hours before endDate.
applicationIdNoApplication (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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / level / description
      Previous value: -"Only rows at this level. `ERROR` is the usual starting point."New value: +"Only rows at this level or worse: `WARNING` returns warnings and errors, and is the usual starting point (a failed send is a warning)."
  2. Changed1 schema field changed
    • changedInput schema / properties / level / enum
      Previous value: -[
      -  "INFO",
      -  "WARNING",
      -  "ERROR",
      -  "DEBUG"
      -]New value: +[
      +  "INFO",
      +  "WARNING",
      +  "ERROR"
      +]
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the read-only/safety profile, but the description adds context they cannot: the required view_logs permission, the bounded window (24h default, 14-day ceiling), and full redaction rules (query values as ?param=***, bodies truncated to 200 chars, SECRETs masked) with the important caveat that a masked value is not a missing one. It also discloses the two distinct row populations — runtime rows and deploy compile warnings — with their metadata.stage and deliverySkipReason conventions.

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

Conciseness4/5

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

Front-loaded with the purpose and the two modes, then supporting detail, which is the right ordering. It is long, and the trailing enumerations of compile-warning and runtime-warning codes read as a reference dump that an agent rarely needs in full before calling, costing some conciseness.

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

Completeness5/5

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

For a twelve-parameter read tool with no output schema, the description still conveys enough about returned row shape (action, level, metadata.stage, metadata.deliverySkipReason, grouped vs raw results) and about window and redaction behavior that an agent can call it correctly and interpret results without further documentation.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description genuinely adds meaning the schema does not: the mode switch on groupBy and which dimension answers which diagnostic question. It does not add much for the other eleven filters, which the schema already documents well.

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

Purpose5/5

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

Names a specific verb and resource (read the bot execution log / flow_execution_log) and immediately frames its unique value: it is the only place that separates 'the action ran' from 'the action produced output'. It also names the sibling that covers the narrower case, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Explicitly splits two modes — raw rows without groupBy, grouped rollup with groupBy — and prescribes which grouping answers which question (`error`, `action`, `flow`, `day`) plus the drill-down workflow (re-run with the same filters and no groupBy). It also names the alternative, get_contact_activity with includeFlowRuns, and the condition that selects it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.