Skip to main content
Glama

delete_flow

Remove a workflow from Prefect by specifying its unique identifier to declutter your automation environment and manage flow lifecycle.

Instructions

Delete a flow by ID.

Args: flow_id: The flow UUID

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flow_idYes

Implementation Reference

  • The @mcp.tool decorated handler function for the 'delete_flow' tool. It validates the flow_id as UUID, deletes the flow using Prefect client, and returns success or error message.
    @mcp.tool async def delete_flow( flow_id: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Delete a flow by ID. Args: flow_id: The flow UUID Returns: Confirmation message """ 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." )] await client.delete_flow(flow_uuid) return [types.TextContent(type="text", text=f"Flow '{flow_id}' deleted successfully.")] except Exception as e: error_message = f"Error deleting flow {flow_id}: {str(e)}" return [types.TextContent(type="text", text=error_message)]

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