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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name 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'], }, },
- src/index.ts:274-280 (handler)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) }], }; }
- src/validators.ts:101-108 (schema)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'), }; }
- src/trello-client.ts:146-154 (handler)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; }); }