Skip to main content
Glama

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
NameRequiredDescriptionDefault
boardIdYesID of the Trello board to get lists from

Implementation Reference

  • 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, }; } }
  • 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, }; } } );

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/praveencs87/trello-mcp'

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