Skip to main content
Glama
diegofornalha

MCP Server Trello

add_list_to_board

Create a new list on a Trello board by specifying the list name. This tool integrates with MCP Server Trello for managing board activities efficiently.

Instructions

Add a new list to the board

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the new list

Implementation Reference

  • src/index.ts:178-191 (registration)
    Tool registration in ListToolsRequestSchema handler, including name, description, and input schema definition.
    {
      name: 'add_list_to_board',
      description: 'Add a new list to the board',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Name of the new list',
          },
        },
        required: ['name'],
      },
    },
  • MCP tool handler case that validates input and delegates to TrelloClient.addList method.
    case 'add_list_to_board': {
      const validArgs = validateAddListRequest(args);
      const list = await this.trelloClient.addList(validArgs.name);
      return {
        content: [{ type: 'text', text: JSON.stringify(list, null, 2) }],
      };
    }
  • Input validation function ensuring 'name' parameter is a non-empty string.
    export function validateAddListRequest(args: Record<string, unknown>): { name: string } {
      if (!args.name) {
        throw new McpError(ErrorCode.InvalidParams, 'name is required');
      }
      return {
        name: validateString(args.name, 'name'),
      };
    }
  • Core implementation that makes the Trello API POST request to create a new list on the board.
    async addList(name: string): Promise<TrelloList> {
      return this.handleRequest(async () => {
        const response = await this.axiosInstance.post('/lists', {
          name,
          idBoard: this.config.boardId,
        });
        return response.data;
      });
    }
Install Server

Other Tools

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

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