Skip to main content
Glama

get-list-actions

Retrieve all actions from a specific Trello list to track changes, monitor activity, and review updates for project management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdYesID of the list to get actions for
filterNoFilter for action types

Implementation Reference

  • The main handler function for the 'get-list-actions' tool. It fetches actions for the specified Trello list ID via the Trello API, supports optional filter, checks credentials, handles errors, and returns JSON data or error message.
    async ({ listId, filter }) => { try { if (!credentials.apiKey || !credentials.apiToken) { return { content: [ { type: 'text', text: 'Trello API credentials are not configured', }, ], isError: true, }; } const url = new URL(`https://api.trello.com/1/lists/${listId}/actions`); url.searchParams.append('key', credentials.apiKey); url.searchParams.append('token', credentials.apiToken); if (filter) url.searchParams.append('filter', filter); const response = await fetch(url.toString()); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting list actions: ${error}`, }, ], isError: true, }; } } );
  • Zod input schema for the 'get-list-actions' tool defining required 'listId' and optional 'filter' parameters.
    { listId: z.string().describe('ID of the list to get actions for'), filter: z.string().optional().describe('Filter for action types'), },
  • Registration of the 'get-list-actions' tool using server.tool(), including name, input schema, and handler function within the registerListsTools function.
    server.tool( 'get-list-actions', { listId: z.string().describe('ID of the list to get actions for'), filter: z.string().optional().describe('Filter for action types'), }, async ({ listId, filter }) => { try { if (!credentials.apiKey || !credentials.apiToken) { return { content: [ { type: 'text', text: 'Trello API credentials are not configured', }, ], isError: true, }; } const url = new URL(`https://api.trello.com/1/lists/${listId}/actions`); url.searchParams.append('key', credentials.apiKey); url.searchParams.append('token', credentials.apiToken); if (filter) url.searchParams.append('filter', filter); const response = await fetch(url.toString()); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting list actions: ${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/adriangrahldev/advanced-trello-mcp-server'

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