Skip to main content
Glama

get_block_types

Retrieve available block types from Prefect workflows with filtering options to find specific components for workflow automation.

Instructions

Get a list of block types with optional filtering.

Args: limit: Maximum number of block types to return offset: Number of block types to skip slug: Filter by slug pattern

Returns: A list of block types with their details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
slugNo

Implementation Reference

  • The handler function implementing the 'get_block_types' MCP tool. It uses the Prefect client to fetch block types with optional filters and returns the result as text content.
    @mcp.tool
    async def get_block_types(
        limit: Optional[int] = None,
        offset: Optional[int] = None,
        slug: Optional[str] = None,
    ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]:
        """
        Get a list of block types with optional filtering.
        
        Args:
            limit: Maximum number of block types to return
            offset: Number of block types to skip
            slug: Filter by slug pattern
            
        Returns:
            A list of block types with their details
        """
        async with get_client() as client:
            # Build filter parameters
            filters = {}
            if slug:
                filters["slug"] = {"like_": f"%{slug}%"}
            
            block_types = await client.read_block_types(
                # 
                # limit=limit,
                # offset=offset,
                # **filters
            )
            
            block_types_result = {
                "block_types": [block_type.model_dump() for block_type in block_types]
            }
            
            return [types.TextContent(type="text", text=str(block_types_result))]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns 'a list of block types with their details,' which implies a read-only operation, but doesn't address key behavioral aspects like pagination behavior (implied by limit/offset but not explained), error conditions, authentication needs, or rate limits. For a tool with no annotation coverage, this leaves the agent with insufficient operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized, with a clear purpose statement followed by parameter and return explanations. It avoids unnecessary verbosity, and every sentence adds value. The only minor improvement could be integrating the 'Args' and 'Returns' sections more seamlessly, but overall it's efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters, no annotations, no output schema), the description is moderately complete. It covers the basic purpose and parameters but lacks details on output structure (beyond 'list with details'), error handling, and sibling differentiation. For a read operation with filtering, this is adequate but leaves gaps that could hinder an agent's ability to use it effectively without trial and error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an 'Args' section that explains each parameter's purpose: 'limit' for maximum returns, 'offset' for skipping items, and 'slug' for filtering by pattern. This adds meaningful context beyond the input schema, which has 0% description coverage and only provides titles. However, it lacks details on parameter formats (e.g., what constitutes a 'slug pattern') or default behaviors, keeping it from a perfect score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get a list of block types with optional filtering.' It specifies the verb ('Get'), resource ('block types'), and scope ('list with optional filtering'), which is more specific than just restating the name. However, it doesn't explicitly distinguish this from sibling tools like 'get_block_type' (singular), leaving some ambiguity about when to use one versus the other.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'optional filtering' but doesn't specify scenarios or prerequisites, such as whether it's for browsing all block types versus retrieving specific ones. With sibling tools like 'get_block_type' (singular) available, the lack of differentiation is a significant gap in usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/allen-munsch/mcp-prefect'

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