Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

create_board_label

Add a custom label to a Trello board by specifying its name and color for better organization and visual categorization of tasks.

Instructions

Create label for a specific board.

Args:
    board_id (str): The ID of the board whose to add label to.
    name (str): The name of the label.
    color (str): The color of the label.

Returns:
    TrelloLabel: A label object for the board.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_idYes
payloadYes

Implementation Reference

  • The MCP tool handler for 'create_board_label' that processes the input payload, calls the BoardService, handles errors, and returns the created TrelloLabel.
    async def create_board_label(ctx: Context, board_id: str, payload: CreateLabelPayload) -> TrelloLabel:
        """Create label for a specific board.
    
        Args:
            board_id (str): The ID of the board whose to add label to.
            name (str): The name of the label.
            color (str): The color of the label.
    
        Returns:
            TrelloLabel: A label object for the board.
        """
        try:
            logger.info(f"Creating label {payload.name} label for board: {board_id}")
            result = await service.create_board_label(board_id, **payload.model_dump(exclude_unset=True))
            logger.info(f"Successfully created label {payload.name} labels for board: {board_id}")
            return result
        except Exception as e:
            error_msg = f"Failed to get board labels: {str(e)}"
            logger.error(error_msg)
            await ctx.error(error_msg)
            raise
  • Pydantic model defining the input schema for the create_board_label tool, with required 'name' and optional 'color' fields.
    from pydantic import BaseModel
    
    
    class CreateLabelPayload(BaseModel):
        """
        Payload for creating a label.
    
        Attributes:
            name (str): The name of the label.
            color (str): The color of the label.
        """
    
        name: str
        color: str | None = None
  • Tool registration line where create_board_label is added to the MCP server.
    mcp.add_tool(board.create_board_label)
  • Helper method in BoardService that makes the Trello API POST request to create the label and parses the response into TrelloLabel.
    async def create_board_label(self, board_id: str, **kwargs) -> TrelloLabel:
        """Create label for a specific board.
    
        Args:
            board_id (str): The ID of the board whose to add label.
    
        Returns:
            List[TrelloLabel]: A list of label objects for the board.
        """
        response = await self.client.POST(f"/boards/{board_id}/labels", data=kwargs)
        return TrelloLabel(**response)
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. While 'Create' implies a mutation, the description doesn't cover important aspects like required permissions, whether the operation is idempotent, rate limits, or error handling. It mentions the return type ('TrelloLabel') but doesn't describe the response format or potential side effects, which is insufficient for a mutation tool.

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 sections. Each sentence adds value, and there's no unnecessary repetition. It could be slightly more concise by integrating the parameter details more seamlessly, but overall it's efficient.

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 (a mutation with 2 parameters, no annotations, and no output schema), the description is partially complete. It covers the basic purpose and parameters but lacks behavioral context, usage guidelines, and detailed return information. This is adequate for a simple tool but has clear gaps that could hinder effective agent use.

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

Parameters3/5

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

The description lists parameters (board_id, name, color) and their purposes, which adds meaning beyond the input schema (which has 0% description coverage). However, it doesn't fully compensate for the schema gap—for example, it doesn't explain that 'color' can be null or provide format details. With 2 parameters and partial coverage, this meets the baseline for minimal viability.

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: 'Create label for a specific board.' It specifies the verb ('create') and resource ('label for a specific board'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_board_labels' or other creation tools, which prevents a perfect score.

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 doesn't mention prerequisites (e.g., needing board access), exclusions, or compare it to sibling tools like 'get_board_labels' for retrieval or other creation tools for different resources. This leaves the agent without context for tool selection.

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/m0xai/trello-mcp-server'

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