Skip to main content
Glama

get_flow

Retrieve detailed information about a specific workflow by providing its unique identifier, enabling users to inspect flow configurations and status.

Instructions

Get details of a specific flow by ID.

Args: flow_id: The flow UUID

Returns: Flow details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flow_idYes

Implementation Reference

  • The handler function for the 'get_flow' tool. It retrieves details of a specific flow by its ID using the Prefect client, adds a UI URL, and returns the information as text content.
    @mcp.tool
    async def get_flow(
        flow_id: str,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        Get details of a specific flow by ID.
        
        Args:
            flow_id: The flow UUID
            
        Returns:
            Flow details
        """
        try:
            async with get_client() as client:
                # Validate flow_id
                try:
                    flow_uuid = UUID(flow_id)
                except ValueError:
                    return [types.TextContent(
                        type="text", 
                        text=f"Invalid flow ID format: {flow_id}. Must be a valid UUID."
                    )]
                
                flow = await client.read_flow(flow_uuid)
                
                # Add UI link
                flow_dict = flow.model_dump()
                flow_dict["ui_url"] = get_flow_url(flow_id)
                
                return [types.TextContent(type="text", text=str(flow_dict))]
        
        except Exception as e:
            error_message = f"Error fetching flow {flow_id}: {str(e)}"
            return [types.TextContent(type="text", text=error_message)]
  • The import statement in main.py that loads the flow module, thereby registering the 'get_flow' tool via its @mcp.tool decorator.
    if APIType.FLOW.value in apis:
        info("Loading Flow API...")
        from . import flow
  • Helper function used by 'get_flow' to generate a UI URL for the flow.
    def get_flow_url(flow_id: str) -> str:
        """Generate a UI URL for a flow."""
        base_url = PREFECT_API_URL.replace("/api", "")
        return f"{base_url}/flows/{flow_id}"
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 retrieves details, implying a read-only operation, but doesn't cover aspects like authentication needs, rate limits, error handling, or what 'Flow details' includes (e.g., structure, fields). For a tool with zero annotation coverage, this is insufficient to fully inform the agent.

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 appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by brief sections for Args and Returns. There's no wasted text, but the structure could be slightly improved by integrating the parameter info into the main description for better flow.

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 (one parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It covers the basic purpose and parameter, but lacks usage guidelines, detailed behavioral context, and output specifics. For a simple read tool, this is minimally adequate but not fully comprehensive.

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 schema description coverage is 0%, so the description must compensate. It adds that 'flow_id' is 'The flow UUID,' providing basic semantics beyond the schema's 'Flow Id' title. However, it doesn't elaborate on format, validation, or examples. With one parameter and minimal extra info, this meets the baseline for low coverage but doesn't fully address the gap.

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: 'Get details of a specific flow by ID.' It specifies the verb ('Get details') and resource ('a specific flow'), which is clear and direct. However, it doesn't explicitly differentiate from sibling tools like 'get_flows' (which likely lists multiple flows) or 'get_flow_run' (which targets flow runs rather than flows), missing full sibling differentiation.

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. It doesn't mention sibling tools like 'get_flows' for listing flows or 'get_flow_run' for flow runs, nor does it specify prerequisites or exclusions. This lack of context leaves the agent without clear usage instructions.

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/allen-munsch/mcp-prefect'

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