get_block_type
Retrieve block type details from Prefect's workflow automation platform by providing the block type slug to access configuration information.
Instructions
Get a block type by slug.
Args: slug: The block type slug
Returns: Block type details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes |
Implementation Reference
- src/mcp_prefect/block.py:47-63 (handler)The handler function for the 'get_block_type' MCP tool. It is decorated with @mcp.tool and fetches a Prefect block type by its slug, returning the details as text content.@mcp.tool async def get_block_type( slug: str, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Get a block type by slug. Args: slug: The block type slug Returns: Block type details """ async with get_client() as client: block_type = await client.read_block_type_by_slug(slug) return [types.TextContent(type="text", text=str(block_type.model_dump()))]