Skip to main content
Glama

get_cards

Retrieve cards from a Trello board or specific list to view tasks and manage project workflows.

Instructions

Get cards from a board or specific list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Implementation Reference

  • Handler for the 'get_cards' tool. Extracts board_id and optional list_id from arguments, calls TrelloClient.getCards, and returns JSON stringified cards.
    case 'get_cards': { const { board_id, list_id } = (request.params.arguments as { request: GetCardsRequest }).request; const cards = await this.trelloClient.getCards(board_id, list_id); return { content: [{ type: 'text', text: JSON.stringify(cards, null, 2) }], }; }
  • src/index.ts:86-110 (registration)
    Registration of the 'get_cards' tool in the ListToolsRequestHandler, including name, description, and inputSchema.
    { name: 'get_cards', description: 'Get cards from a board or specific list', inputSchema: { type: 'object', properties: { request: { type: 'object', properties: { board_id: { type: 'string', description: 'ID of the board', }, list_id: { type: 'string', description: 'Optional ID of a specific list', }, }, required: ['board_id'], }, }, required: ['request'], title: 'get_cardsArguments', }, },
  • TypeScript interface definition for GetCardsRequest, used for type-checking the tool arguments in the handler.
    export interface GetCardsRequest { board_id: string; list_id?: string; }
  • Core implementation of fetching cards from Trello API, either from a specific list or all board cards, called by the tool handler.
    async getCards(boardId: string, listId?: string): Promise<Card[]> { const endpoint = listId ? `${this.baseUrl}/lists/${listId}/cards` : `${this.baseUrl}/boards/${boardId}/cards`; const response = await axios.get(`${endpoint}?${this.getAuthParams()}`); return response.data; }

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/andypost/mcp-server-ts-trello'

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