trello_get_card_actions
Retrieve activity history and comments for a Trello card to track changes and discussions. Filter by action type and set result limits for focused review.
Instructions
Get activity history and comments for a specific Trello card. Useful for tracking changes and discussions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | Trello API key (automatically provided by Claude.app from your stored credentials) | |
| token | Yes | Trello API token (automatically provided by Claude.app from your stored credentials) | |
| cardId | Yes | ID of the card to get actions for | |
| filter | No | Filter actions by type: "commentCard" for comments only, "updateCard" for updates | commentCard |
| limit | No | Maximum number of actions to return |
Implementation Reference
- src/tools/advanced.ts:227-291 (handler)The handler function for 'trello_get_card_actions' which retrieves card actions using the TrelloClient.
export async function handleTrelloGetCardActions(args: unknown) { try { const { apiKey, token, cardId, filter, limit } = validateGetCardActions(args); const client = new TrelloClient({ apiKey, token }); const response = await client.getCardActions(cardId, { ...(filter && { filter }), ...(limit !== undefined && { limit }) }); const actions = response.data; const result = { summary: `Found ${actions.length} action(s) for card`, cardId, actions: actions.map(action => ({ id: action.id, type: action.type, date: action.date, memberCreator: action.memberCreator ? { id: action.memberCreator.id, fullName: action.memberCreator.fullName, username: action.memberCreator.username } : null, data: { text: action.data?.text, old: action.data?.old, card: action.data?.card ? { id: action.data.card.id, name: action.data.card.name } : null, list: action.data?.list ? { id: action.data.list.id, name: action.data.list.name } : null } })), rateLimit: response.rateLimit }; return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2) } ] }; } catch (error) { const errorMessage = error instanceof z.ZodError ? formatValidationError(error) : error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text' as const, text: `Error getting card actions: ${errorMessage}` } ], isError: true }; } } - src/tools/advanced.ts:19-29 (schema)Validation logic for the inputs of 'trello_get_card_actions'.
const validateGetCardActions = (args: unknown) => { const schema = z.object({ apiKey: z.string().min(1, 'API key is required'), token: z.string().min(1, 'Token is required'), cardId: z.string().regex(/^[a-f0-9]{24}$/, 'Invalid card ID format'), filter: z.string().optional(), limit: z.number().min(1).max(1000).optional() }); return schema.parse(args); }; - src/tools/advanced.ts:190-225 (registration)Registration and schema definition for the 'trello_get_card_actions' tool.
export const trelloGetCardActionsTool: Tool = { name: 'trello_get_card_actions', description: 'Get activity history and comments for a specific Trello card. Useful for tracking changes and discussions.', inputSchema: { type: 'object', properties: { apiKey: { type: 'string', description: 'Trello API key (automatically provided by Claude.app from your stored credentials)' }, token: { type: 'string', description: 'Trello API token (automatically provided by Claude.app from your stored credentials)' }, cardId: { type: 'string', description: 'ID of the card to get actions for', pattern: '^[a-f0-9]{24}$' }, filter: { type: 'string', enum: ['all', 'commentCard', 'updateCard', 'createCard'], description: 'Filter actions by type: "commentCard" for comments only, "updateCard" for updates', default: 'commentCard' }, limit: { type: 'number', minimum: 1, maximum: 1000, description: 'Maximum number of actions to return', default: 50 } }, required: ['apiKey', 'token', 'cardId'] } };