Skip to main content
Glama
PrefectHQ

prefect-mcp-server

Official
by PrefectHQ

get_flow_runs

Fetch Prefect flow runs with optional filters. Monitor workflow status, debug failures, and review run details by ID, state, or tags.

Instructions

Get flow runs with optional filters.

Returns compact summaries by default. Filter by specific ID(s) for full detail including parameters, inlined deployment info, and work pool info.

Filter operators:

  • any_: Match any value in list

  • all_: Match all values

  • like_: SQL LIKE pattern matching

  • not_any_: Exclude values

  • is_null_: Check for null/not null

  • after_/before_: Time comparisons

  • gt_/gte_/lt_/lte_: Numeric comparisons

Examples: - List recent runs: get_flow_runs() - Get specific run: get_flow_runs(filter={"id": {"any_": [""]}}) - Failed runs: get_flow_runs(filter={"state": {"type": {"any_": ["FAILED"]}}}) - Production runs: get_flow_runs(filter={"tags": {"all_": ["production"]}})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of flow runs to return
filterNoJSON filter object for advanced querying. Supports all Prefect FlowRunFilter fields.
workspace_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
errorYes
detailNo
successYes
flow_runsYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that default returns compact summaries and filtering by specific ID provides full detail. It does not mention permissions, rate limits, or read-only nature, but the behavior is clearly described.

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

Conciseness5/5

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

The description is concise at under 150 words, well-structured with a clear purpose, operator list, and examples. Every sentence adds value without repetition.

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

Completeness4/5

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

Given the presence of an output schema, the description needs not detail return values. It covers the main functionality, filter usage, and output granularity. Minor omission: no mention of the default sorting or pagination, but still adequate.

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 67% with two parameters described. The description adds significant value by explaining filter operators, providing examples, and clarifying how the filter parameter works, which goes beyond the schema's basic description.

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?

The description clearly states the tool retrieves flow runs with optional filters. It is specific about the resource and action, and differentiates from siblings like get_flows and get_task_runs.

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

Usage Guidelines4/5

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

The description explains when to use the filter parameter for specific IDs vs. the default compact summaries, and provides filter operators and examples. However, it does not explicitly state when not to use this tool or compare with alternatives like get_flow_run_logs.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PrefectHQ/prefect-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server