pause_work_queue
Stop a Prefect work queue from processing new workflow runs by providing its UUID, temporarily halting automated task execution.
Instructions
Pause a work queue.
Args: work_queue_id: The work queue UUID
Returns: Details of the updated work queue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| work_queue_id | Yes |
Implementation Reference
- src/mcp_prefect/work_queue.py:203-224 (handler)The implementation of the 'pause_work_queue' tool handler. This async function is decorated with @mcp.tool, which registers it as an MCP tool. It uses the Prefect client to update the specified work queue by setting is_paused=True and returns the details of the updated work queue.@mcp.tool async def pause_work_queue( work_queue_id: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Pause a work queue. Args: work_queue_id: The work queue UUID Returns: Details of the updated work queue """ async with get_client() as client: await client.update_work_queue( id=UUID(work_queue_id), is_paused=True ) # Read the updated work queue to return its details updated_work_queue = await client.read_work_queue(UUID(work_queue_id)) return [types.TextContent(type="text", text=str(updated_work_queue.model_dump()))]