delete_block_document
Remove a block document from Prefect workflows by specifying its unique identifier to manage storage and resource allocation.
Instructions
Delete a block document by ID.
Args: block_document_id: The block document UUID
Returns: Confirmation message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block_document_id | Yes |
Implementation Reference
- src/mcp_prefect/block.py:125-142 (handler)The handler function for the 'delete_block_document' MCP tool, decorated with @mcp.tool. It takes a block_document_id, uses the Prefect client to delete the block document by UUID, and returns a success message.@mcp.tool async def delete_block_document( block_document_id: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Delete a block document by ID. Args: block_document_id: The block document UUID Returns: Confirmation message """ async with get_client() as client: await client.delete_block_document(UUID(block_document_id)) return [types.TextContent(type="text", text=f"Block document '{block_document_id}' deleted successfully.")]