Skip to main content
Glama
fortunto2
by fortunto2

filter_flows

Filter Prefect workflow automation flows using specific criteria to identify relevant workflows for management and execution.

Instructions

Filter flows based on specified criteria.

Args: filter_criteria: Dictionary with filter criteria according to Prefect API. Example: {"flows": {"tags": {"all_": ["production"]}}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_criteriaYes

Implementation Reference

  • The main handler function for the 'filter_flows' tool. It is registered via the @mcp.tool() decorator and implements filtering of Prefect flows using the provided filter criteria with the Prefect client.
    @mcp.tool() async def filter_flows(ctx: Context, filter_criteria: Dict[str, Any]) -> Dict[str, Any]: """Filter flows based on specified criteria. Args: filter_criteria: Dictionary with filter criteria according to Prefect API. Example: {"flows": {"tags": {"all_": ["production"]}}} """ async with get_client() as client: flow_filter = FlowFilter(**filter_criteria) flows = await client.read_flows(flow_filter=flow_filter) return {"flows": [flow.model_dump() for flow in flows]}

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/fortunto2/prefect-mcp-server'

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