Skip to main content
Glama

get-lists

Retrieve all lists from a specified Trello board to organize and manage tasks, cards, and workflows 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 fetches the lists for the given boardId from the Trello API, returns the JSON data as text content, or an error message if failed.
    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, }; } }
  • The Zod 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)
    The registration of the 'get-lists' tool using server.tool(), including inline schema and handler.
    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