Skip to main content
Glama
PrefectHQ

prefect-mcp-server

Official
by PrefectHQ

read_events

Retrieve and filter workflow events from Prefect using type prefixes or time ranges.

Instructions

Read and filter events from the Prefect instance.

Provides a structured view of events with filtering capabilities.

Note: When no time range is specified, events from the last 1 hour are returned by default. Use occurred_after/occurred_before parameters to query a different time range.

Common event type prefixes:

  • prefect.flow-run: Flow run lifecycle events

  • prefect.deployment: Deployment-related events

  • prefect.work-queue: Work queue events

  • prefect.agent: Agent events

Examples: - Recent flow run events: read_events(event_type_prefix="prefect.flow-run") - Last 24 hours: read_events(occurred_after="") - Specific time range: read_events(occurred_after="2024-01-01T00:00:00Z", occurred_before="2024-01-02T00:00:00Z")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of events to return
workspace_idNo
occurred_afterNoISO 8601 timestamp to filter events after
occurred_beforeNoISO 8601 timestamp to filter events before
event_type_prefixNoFilter events by type prefix

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
errorYes
totalYes
eventsYes
successYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the default time range and filtering behavior, but does not mention pagination, ordering, or performance implications. The limit parameter's maximum is only in the schema, not in the description. Adequate but not comprehensive.

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 well-structured with sections: general purpose, a note about default time range, list of common event type prefixes, and concrete examples. Every sentence adds value, and the most critical information is front-loaded.

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 complexity (5 parameters) and that an output schema exists, the description covers the main usage scenarios: default behavior, time filtering, and event type filtering. It omits details like pagination and sorting, but the examples provide practical guidance. Overall, it is sufficiently complete for a read tool.

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

Parameters4/5

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

Schema description coverage is high (80%), but the description adds value by explaining the default time range behavior and providing common event type prefixes and examples. This goes beyond the schema, which only lists property descriptions and examples.

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 reads and filters events from the Prefect instance. It specifies the resource (events) and action (read), and distinguishes it from sibling tools like get_flow_runs and get_task_runs which focus on different resources.

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 provides explicit usage guidance: it explains the default time range (last 1 hour), how to filter by time using occurred_after/occurred_before, and event type prefixes with examples. It does not explicitly state when not to use the tool or mention alternative tools, but the context is clear enough.

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