Skip to main content
Glama

delete_flow_run

Remove a specific workflow execution from Prefect's automation platform by providing its unique identifier to clean up completed or failed runs.

Instructions

Delete a flow run.

Args: flow_run_id: The flow run UUID

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flow_run_idYes

Implementation Reference

  • The handler function for the 'delete_flow_run' tool. It is decorated with @mcp.tool, which registers it with the MCP server. The function takes a flow_run_id, uses the Prefect client to delete the flow run, and returns a confirmation message.
    @mcp.tool
    async def delete_flow_run(
        flow_run_id: str,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        Delete a flow run.
        
        Args:
            flow_run_id: The flow run UUID
            
        Returns:
            Confirmation message
        """
        async with get_client() as client:
            await client.delete_flow_run(UUID(flow_run_id))
            
            return [types.TextContent(type="text", text=f"Flow run '{flow_run_id}' deleted successfully.")]
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 states the action is 'Delete' which implies a destructive mutation, but doesn't disclose critical behavioral traits: whether deletion is permanent/reversible, what permissions are required, if there are side effects (e.g., cascading deletions), or rate limits. The confirmation message return is mentioned but not elaborated.

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 concise with three short sentences that are front-loaded: the core action first, then parameter and return details. No wasted words, though the structure with 'Args:' and 'Returns:' headings is slightly verbose for such simple content.

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

Completeness2/5

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

For a destructive mutation tool with no annotations, no output schema, and minimal parameter documentation, the description is incomplete. It lacks crucial context: irreversible nature, permissions, error conditions, and what the confirmation message contains. Sibling tools suggest this is part of a workflow system where deletion implications matter.

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 semantic context beyond the schema: it specifies that flow_run_id is a 'UUID' (helpful for format), but with 0% schema description coverage and 1 parameter, this provides only basic compensation. It doesn't explain where to find the UUID or validate format expectations beyond 'string' type.

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 verb 'Delete' and the resource 'flow run', making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling deletion tools like delete_flow, delete_deployment, or delete_work_queue, which would require specifying what distinguishes a flow run from those other entities.

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 cancel_flow_run or restart_flow_run that might be relevant alternatives, nor does it specify prerequisites or conditions for deletion (e.g., only for completed runs).

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