get_work_queue
Retrieve work queue details by ID to monitor workflow execution status and manage task processing in Prefect's automation platform.
Instructions
Get details of a specific work queue by ID.
Args: work_queue_id: The work queue UUID
Returns: Work queue details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| work_queue_id | Yes |
Implementation Reference
- src/mcp_prefect/work_queue.py:64-81 (handler)The main handler function for the 'get_work_queue' MCP tool. Decorated with @mcp.tool, it retrieves the specified work queue by ID using the Prefect client and returns its details as structured text content.@mcp.tool async def get_work_queue( work_queue_id: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Get details of a specific work queue by ID. Args: work_queue_id: The work queue UUID Returns: Work queue details """ async with get_client() as client: work_queue = await client.read_work_queue(UUID(work_queue_id)) return [types.TextContent(type="text", text=str(work_queue.model_dump()))]
- src/mcp_prefect/main.py:62-64 (registration)The registration point where the work_queue module is imported during server startup when WORK_QUEUE API is enabled. This import executes the @mcp.tool decorators, registering the 'get_work_queue' tool on the MCP server.if APIType.WORK_QUEUE.value in apis: info("Loading Work Queue API...") from . import work_queue
- src/mcp_prefect/server.py:6-6 (registration)Creation of the FastMCP server instance 'mcp' to which tools like 'get_work_queue' are registered via decorators.mcp = FastMCP(f"MCP Prefect {__version__}")