Skip to main content
Glama
fortunto2

Prefect MCP Server

by fortunto2

search_flows

Find Prefect workflows by name or tags to manage automation processes efficiently.

Instructions

Search for flows by name and/or tags.

Args:
    name: Optional name to search for (case-insensitive contains match).
    tags: Optional list of tags to filter by.
    limit: Maximum number of flows to return (default 20).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
tagsNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Implements the 'search_flows' MCP tool. Decorated with @mcp.tool() for automatic registration and schema generation from type hints. Searches Prefect flows using FlowFilter for name (contains) and tags (all), retrieves via client.read_flows, and returns list with count.
    @mcp.tool()
    async def search_flows(
        ctx: Context,
        name: Optional[str] = None,
        tags: Optional[List[str]] = None,
        limit: int = 20,
    ) -> Dict[str, Any]:
        """Search for flows by name and/or tags.
    
        Args:
            name: Optional name to search for (case-insensitive contains match).
            tags: Optional list of tags to filter by.
            limit: Maximum number of flows to return (default 20).
        """
        filter_dict = {}
    
        if name:
            filter_dict["name"] = {"contains": name}
    
        if tags:
            filter_dict["tags"] = {"all_": tags}
    
        async with get_client() as client:
            flow_filter = FlowFilter(**filter_dict)
            flows = await client.read_flows(flow_filter=flow_filter, limit=limit)
            return {"flows": [flow.model_dump() for flow in flows], "count": len(flows)}
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions search behavior ('case-insensitive contains match') and a default limit, but doesn't disclose other critical traits like pagination, sorting, error handling, authentication needs, rate limits, or what the output contains. For a search tool with zero annotation coverage, this leaves significant behavioral gaps.

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 appropriately sized and front-loaded: the first sentence states the purpose, followed by a structured 'Args' section that efficiently documents parameters. Every sentence earns its place with no wasted words, making it easy to scan and understand quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (3 parameters, search functionality) and the presence of an output schema (which handles return values), the description is partially complete. It covers parameters well but lacks behavioral context (e.g., search scope, result format hints). With no annotations and an output schema, it should ideally mention more about the search behavior or limitations to be fully adequate.

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

Parameters5/5

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

The description adds substantial meaning beyond the input schema, which has 0% schema description coverage. It explains all three parameters: 'name' as an optional case-insensitive contains match, 'tags' as an optional list for filtering, and 'limit' with its default value. This fully compensates for the lack of schema descriptions, providing clear semantics for each parameter.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Search for flows by name and/or tags.' It specifies the verb ('search') and resource ('flows'), and distinguishes it from siblings like 'filter_flows' or 'list_flows' by emphasizing search functionality. However, it doesn't explicitly differentiate from 'search_flow_runs_by_state' or 'search_deployments_by_status' beyond the resource type.

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

Usage Guidelines3/5

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

The description implies usage through the phrase 'Search for flows by name and/or tags,' suggesting it's for finding flows based on these criteria. It doesn't provide explicit guidance on when to use this tool versus alternatives like 'filter_flows' or 'get_flow_by_name,' nor does it mention prerequisites or exclusions. The context is clear but lacks comparative direction.

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

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