Skip to main content
Glama
fortunto2

Prefect MCP Server

by fortunto2

search_deployments_by_status

Filter and retrieve workflow deployments based on their schedule status to manage active or inactive automation tasks.

Instructions

Search for deployments by schedule status.

Args:
    is_schedule_active: Filter deployments by whether their schedule is active.
    limit: Maximum number of deployments to return (default 20).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
is_schedule_activeNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'search_deployments_by_status' tool. It is decorated with @mcp.tool(), which also serves as the registration. The function filters deployments based on whether their schedule is active using Prefect's DeploymentFilter and returns a list of matching deployments.
    @mcp.tool()
    async def search_deployments_by_status(
        ctx: Context, is_schedule_active: Optional[bool] = None, limit: int = 20
    ) -> Dict[str, Any]:
        """Search for deployments by schedule status.
    
        Args:
            is_schedule_active: Filter deployments by whether their schedule is active.
            limit: Maximum number of deployments to return (default 20).
        """
        filter_dict = {}
    
        if is_schedule_active is not None:
            filter_dict["is_schedule_active"] = {"equals": is_schedule_active}
    
        async with get_client() as client:
            deployment_filter = DeploymentFilter(**filter_dict) if filter_dict else None
            deployments = await client.read_deployments(
                deployment_filter=deployment_filter, limit=limit
            )
            return {
                "deployments": [depl.model_dump() for depl in deployments],
                "count": len(deployments),
            }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only mentions the filtering capability and default limit, but doesn't describe pagination behavior, rate limits, authentication requirements, error conditions, or what happens when no deployments match the criteria. For a search tool with zero annotation coverage, this is insufficient.

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?

The description is efficiently structured with a clear purpose statement followed by parameter explanations. Both sentences earn their place by providing essential information. The formatting with 'Args:' header is helpful though not strictly necessary for conciseness.

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 has an output schema (which handles return values) and only 2 parameters with good description coverage, the description is reasonably complete for basic usage. However, as a search tool with no annotations, it should ideally mention more about behavioral aspects like result ordering, pagination, or common use cases.

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?

The description adds meaningful context for both parameters beyond the schema's 0% coverage. It explains that 'is_schedule_active' filters deployments by whether their schedule is active (clarifying the boolean/null semantics), and specifies that 'limit' is the maximum number to return with a default of 20. This compensates well for the schema's lack of descriptions.

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 as 'Search for deployments by schedule status', which is a specific verb+resource combination. It distinguishes from siblings like 'list_deployments' by focusing on schedule status filtering, though it doesn't explicitly contrast with 'filter_deployments' which might have broader filtering capabilities.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'filter_deployments', 'list_deployments', or 'search_flow_runs_by_state'. It mentions the filtering parameter but doesn't explain the specific use case for schedule status searches versus other filtering approaches.

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