Skip to main content
Glama
fortunto2

Prefect MCP Server

by fortunto2

get_flow_by_id

Retrieve a specific workflow automation flow using its unique identifier to access and manage Prefect workflow details.

Instructions

Get a flow by its ID.

Args:
    flow_id: ID of the flow to retrieve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flow_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function that implements the get_flow_by_id tool logic. Retrieves a Prefect flow by its ID using the Prefect client and returns the flow details or an error.
    @mcp.tool()
    async def get_flow_by_id(ctx: Context, flow_id: str) -> Dict[str, Any]:
        """Get a flow by its ID.
    
        Args:
            flow_id: ID of the flow to retrieve.
        """
        if not flow_id:
            return {"error": "Missing required argument: flow_id"}
    
        async with get_client() as client:
            try:
                flow = await client.read_flow(UUID(flow_id))
                return {"flow": flow.model_dump()}
            except Exception as e:
                return {"error": f"Failed to get flow: {str(e)}"}
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 of behavioral disclosure. It states the tool 'Get[s] a flow by its ID', which implies a read-only operation, but doesn't clarify aspects like authentication needs, error handling (e.g., what happens if the ID is invalid), rate limits, or response format. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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, with the core purpose stated in the first sentence and parameter details in a brief 'Args' section. Every sentence earns its place without redundancy, making it efficient and easy to parse.

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 low complexity (single parameter, no nested objects) and the presence of an output schema, the description is somewhat complete but has gaps. It covers the basic action and parameter, but without annotations, it misses behavioral context like error handling or permissions. The output schema likely handles return values, so the description doesn't need to explain those, but overall it's minimal yet functional.

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

Parameters3/5

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

The description adds minimal meaning beyond the input schema, which has 0% description coverage. It specifies that 'flow_id' is the 'ID of the flow to retrieve', which clarifies the parameter's purpose but doesn't provide details like format, constraints, or examples. With only one parameter and low schema coverage, this is adequate but lacks depth, aligning with the baseline expectation.

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 with a specific verb ('Get') and resource ('a flow by its ID'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_flow_by_name' or 'list_flows', which would require mentioning that this tool retrieves a single flow using its unique identifier rather than name or listing multiple flows.

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. With siblings like 'get_flow_by_name', 'list_flows', and 'filter_flows', it doesn't specify that this is for retrieving a specific flow when you have its ID, nor does it mention prerequisites or exclusions, leaving usage context implied at best.

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