Skip to main content
Glama
m0xai

Trello MCP Server with Python

by m0xai

create_list

Add a new list to a Trello board to organize tasks and workflows. Specify board ID, list name, and position for structured project management.

Instructions

Creates a new list on a given board.

Args: board_id (str): The ID of the board to create the list in. name (str): The name of the new list. pos (str, optional): The position of the new list. Can be "top" or "bottom". Defaults to "bottom". Returns: TrelloList: The newly created list object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_idYes
nameYes
posNobottom

Implementation Reference

  • The MCP tool handler for the 'create_list' tool. It takes board_id, name, and optional pos, calls the ListService to create the list, handles errors, and returns the TrelloList.
    async def create_list( ctx: Context, board_id: str, name: str, pos: str = "bottom" ) -> TrelloList: """Creates a new list on a given board. Args: board_id (str): The ID of the board to create the list in. name (str): The name of the new list. pos (str, optional): The position of the new list. Can be "top" or "bottom". Defaults to "bottom". Returns: TrelloList: The newly created list object. """ try: logger.info(f"Creating list '{name}' in board: {board_id}") result = await service.create_list(board_id, name, pos) logger.info(f"Successfully created list '{name}' in board: {board_id}") return result except Exception as e: error_msg = f"Failed to create list: {str(e)}" logger.error(error_msg) await ctx.error(error_msg) raise
  • Registration of the 'create_list' tool from the list module with the MCP server.
    mcp.add_tool(list.create_list)
  • The ListService helper method that makes the actual Trello API call to create a new list.
    async def create_list( self, board_id: str, name: str, pos: str = "bottom" ) -> TrelloList: """Creates a new list on a given board. Args: board_id (str): The ID of the board to create the list in. name (str): The name of the new list. pos (str, optional): The position of the new list. Can be "top" or "bottom". Defaults to "bottom". Returns: TrelloList: The newly created list object. """ data = {"name": name, "idBoard": board_id, "pos": pos} response = await self.client.POST("/lists", data=data) return TrelloList(**response)

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