delete_deployment
Remove a Prefect deployment by its UUID to clean up workflow automation resources and manage your deployment lifecycle.
Instructions
Delete a deployment by ID.
Args: deployment_id: The deployment UUID
Returns: Confirmation message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deployment_id | Yes |
Implementation Reference
- src/mcp_prefect/deployment.py:154-171 (handler)The handler function for the 'delete_deployment' MCP tool. It is decorated with @mcp.tool for registration and implements the logic to delete a Prefect deployment by ID using the Prefect client, returning a confirmation message.@mcp.tool async def delete_deployment( deployment_id: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Delete a deployment by ID. Args: deployment_id: The deployment UUID Returns: Confirmation message """ async with get_client() as client: await client.delete_deployment(UUID(deployment_id)) return [types.TextContent(type="text", text=f"Deployment '{deployment_id}' deleted successfully.")]
- src/mcp_prefect/deployment.py:154-154 (registration)The @mcp.tool decorator registers the delete_deployment function as an MCP tool.@mcp.tool