Skip to main content
Glama

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
NameRequiredDescriptionDefault
deployment_idYes

Implementation Reference

  • 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.")]
  • The @mcp.tool decorator registers the delete_deployment function as an MCP tool.
    @mcp.tool
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states this is a deletion operation, implying it's destructive, but doesn't disclose critical behavioral traits like whether deletion is permanent, requires specific permissions, has side effects on related resources, or returns detailed error messages. The mention of a 'Confirmation message' return is minimal behavioral context.

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 brief and front-loaded with the core purpose in the first sentence. The Args/Returns sections are structured but could be more integrated. No unnecessary information is included, though it could be slightly more detailed without losing conciseness.

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?

Given the destructive nature (implied by 'Delete'), lack of annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't cover error cases, side effects, permissions, or detailed return values beyond a generic confirmation. For a deletion tool with significant behavioral implications, this leaves too many contextual gaps.

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?

Schema description coverage is 0%, so the description must compensate. It adds that 'deployment_id' is a 'UUID', which provides format context beyond the schema's generic string type. However, it doesn't explain where to find this ID or validate it, leaving gaps. With one parameter and some added semantics, this meets the baseline for minimal compensation.

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 action ('Delete') and target resource ('a deployment by ID'), making the purpose immediately understandable. It distinguishes from siblings like 'delete_flow' or 'delete_flow_run' by specifying the deployment resource type. However, it doesn't explicitly differentiate from 'cancel_flow_run' which might also terminate deployments indirectly.

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?

No guidance is provided about when to use this tool versus alternatives. While the description specifies deleting by ID, it doesn't mention prerequisites (e.g., whether the deployment must be stopped first), consequences (e.g., what happens to associated flow runs), or when to choose this over similar tools like 'delete_flow' or 'cancel_flow_run'.

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