Skip to main content
Glama
fortunto2
by fortunto2

get_deployment_by_id

Retrieve a specific deployment by its unique ID from the Prefect MCP Server, enabling precise access to workflow automation details for streamlined management.

Instructions

Get a deployment by its ID.

Args: deployment_id: ID of the deployment to retrieve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_idYes

Implementation Reference

  • The main handler function for the 'get_deployment_by_id' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function retrieves a Prefect deployment by its ID using the Prefect client.
    @mcp.tool() async def get_deployment_by_id(ctx: Context, deployment_id: str) -> Dict[str, Any]: """Get a deployment by its ID. Args: deployment_id: ID of the deployment to retrieve. """ if not deployment_id: return {"error": "Missing required argument: deployment_id"} async with get_client() as client: try: deployment = await client.read_deployment(UUID(deployment_id)) return {"deployment": deployment.model_dump()} except Exception as e: return {"error": f"Failed to get deployment: {str(e)}"}

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/fortunto2/prefect-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server