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

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