Skip to main content
Glama

get_deployment

Retrieve deployment details by ID from Prefect's workflow automation platform to access configuration, status, and execution information for workflow management.

Instructions

Get details of a specific deployment by ID.

Args: deployment_id: The deployment UUID

Returns: Deployment details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_idYes

Implementation Reference

  • The MCP tool handler for 'get_deployment'. Fetches deployment details by ID from Prefect, adds UI URL, and returns as formatted text.
    @mcp.tool
    async def get_deployment(
        deployment_id: str,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        Get details of a specific deployment by ID.
        
        Args:
            deployment_id: The deployment UUID
            
        Returns:
            Deployment details
        """
        async with get_client() as client:
            deployment = await client.read_deployment(UUID(deployment_id))
            
            # Add UI link
            deployment_dict = deployment.model_dump()
            deployment_dict["ui_url"] = get_deployment_url(deployment_id)
            
            return [types.TextContent(type="text", text=str(deployment_dict))]
  • Helper function used by get_deployment to generate the UI URL for the deployment.
    def get_deployment_url(deployment_id: str) -> str:
        base_url = PREFECT_API_URL.replace("/api", "")
        return f"{base_url}/deployments/{deployment_id}"
  • The @mcp.tool decorator registers this function as an MCP tool named 'get_deployment'.
    @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 the full burden of behavioral disclosure. It states this is a read operation ('Get details'), implying it's likely safe and non-destructive, but doesn't mention authentication requirements, rate limits, error conditions, or what 'Deployment details' includes (e.g., structure, fields). This leaves significant gaps for an agent to understand the tool's behavior.

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, with the main purpose stated clearly in the first sentence. The 'Args' and 'Returns' sections are structured but could be more integrated; overall, it's efficient with little waste, though minor improvements in flow are possible.

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 complexity (a read operation with no annotations, no output schema, and 0% schema description coverage), the description is incomplete. It doesn't explain what 'Deployment details' returns, potential errors, or usage context relative to siblings. For a tool in a server with many related tools, more guidance is needed to ensure the agent can use it effectively.

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 value beyond the input schema. It specifies that 'deployment_id' is a 'UUID', which clarifies the format beyond the schema's generic 'string' type, but with 0% schema description coverage and only one parameter, this is a modest improvement. The baseline for high schema coverage would be 3, but here the description compensates slightly for the lack of schema descriptions.

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 with a specific verb ('Get details') and resource ('a specific deployment by ID'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_deployments' (plural) or 'get_flow_run', which might retrieve similar deployment-related data in different contexts.

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_deployments' for listing deployments or 'get_flow_run' for deployment-related runs, nor does it specify prerequisites or exclusions for usage.

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