get-lists
Retrieve all lists from a specified Trello board to organize tasks, track workflows, and manage project stages within the board structure.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | ID of the Trello board to get lists from |
Implementation Reference
- src/index.ts:158-183 (handler)The handler function for the 'get-lists' tool. It takes a boardId, fetches the lists from the Trello API, and returns the JSON data or an error.async ({ boardId }) => { try { const response = await fetch( `https://api.trello.com/1/boards/${boardId}/lists?key=${trelloApiKey}&token=${trelloApiToken}` ); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting lists: ${error}`, }, ], isError: true, }; } }
- src/index.ts:155-157 (schema)Input schema for the 'get-lists' tool, defining the required boardId parameter.{ boardId: z.string().describe('ID of the Trello board to get lists from'), },
- src/index.ts:153-184 (registration)Registration of the 'get-lists' tool using server.tool(), including name, input schema, and handler function.server.tool( 'get-lists', { boardId: z.string().describe('ID of the Trello board to get lists from'), }, async ({ boardId }) => { try { const response = await fetch( `https://api.trello.com/1/boards/${boardId}/lists?key=${trelloApiKey}&token=${trelloApiToken}` ); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting lists: ${error}`, }, ], isError: true, }; } } );