trello_create_list
Create a new list in a Trello board to organize workflow columns like "To Do", "In Progress", or "Done" for project management.
Instructions
Create a new list in a Trello board. Use this to add workflow columns like "To Do", "In Progress", or "Done".
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | Trello API key (automatically provided by Claude.app from your stored credentials) | |
| token | Yes | Trello API token (automatically provided by Claude.app from your stored credentials) | |
| name | Yes | Name of the new list (e.g., "To Do", "In Progress", "Done") | |
| idBoard | Yes | ID of the board where the list will be created (you can get this from list_boards) | |
| pos | No | Position of the list in the board: "top", "bottom", or specific number | bottom |
Implementation Reference
- src/tools/lists.ts:180-231 (handler)The handler function that performs the API call to create a Trello list.
export async function handleTrelloCreateList(args: unknown) { try { const listData = validateCreateList(args); const { apiKey, token, ...createData } = listData; const client = new TrelloClient({ apiKey, token }); const response = await client.createList({ name: createData.name, idBoard: createData.idBoard, ...(createData.pos !== undefined && { pos: createData.pos }) }); const list = response.data; const result = { summary: `Created list: ${list.name}`, list: { id: list.id, name: list.name, boardId: list.idBoard, position: list.pos, closed: list.closed, subscribed: list.subscribed }, rateLimit: response.rateLimit }; return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2) } ] }; } catch (error) { const errorMessage = error instanceof z.ZodError ? formatValidationError(error) : error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text' as const, text: `Error creating list: ${errorMessage}` } ], isError: true }; } } - src/tools/lists.ts:18-28 (schema)Input validation schema for creating a Trello list.
const validateCreateList = (args: unknown) => { const schema = z.object({ apiKey: z.string().min(1, 'API key is required'), token: z.string().min(1, 'Token is required'), name: z.string().min(1, 'List name is required'), idBoard: z.string().regex(/^[a-f0-9]{24}$/, 'Invalid board ID format'), pos: z.union([z.number().min(0), z.enum(['top', 'bottom'])]).optional() }); return schema.parse(args); }; - src/tools/lists.ts:143-178 (registration)Tool definition for 'trello_create_list'.
export const trelloCreateListTool: Tool = { name: 'trello_create_list', description: 'Create a new list in a Trello board. Use this to add workflow columns like "To Do", "In Progress", or "Done".', inputSchema: { type: 'object', properties: { apiKey: { type: 'string', description: 'Trello API key (automatically provided by Claude.app from your stored credentials)' }, token: { type: 'string', description: 'Trello API token (automatically provided by Claude.app from your stored credentials)' }, name: { type: 'string', description: 'Name of the new list (e.g., "To Do", "In Progress", "Done")', minLength: 1 }, idBoard: { type: 'string', description: 'ID of the board where the list will be created (you can get this from list_boards)', pattern: '^[a-f0-9]{24}$' }, pos: { oneOf: [ { type: 'number', minimum: 0 }, { type: 'string', enum: ['top', 'bottom'] } ], description: 'Position of the list in the board: "top", "bottom", or specific number', default: 'bottom' } }, required: ['apiKey', 'token', 'name', 'idBoard'] } };