Skip to main content
Glama
agrath

Atlassian Trello MCP Server

trello_get_card_actions

Retrieve activity history and comments for a specific Trello card to track changes and discussions.

Instructions

Get activity history and comments for a specific Trello card. Useful for tracking changes and discussions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyNoTrello API key (optional if TRELLO_API_KEY env var is set)
tokenNoTrello API token (optional if TRELLO_TOKEN env var is set)
cardIdYesID or URL of the card (e.g. "abc123" or "https://trello.com/c/abc123/1-title")
filterNoFilter actions by type: "commentCard" for comments only, "updateCard" for updatescommentCard
limitNoMaximum number of actions to return

Implementation Reference

  • Main handler function that executes the 'trello_get_card_actions' tool logic. Extracts credentials, validates params (cardId, filter, limit), calls TrelloClient.getCardActions(), and formats the response with action details (type, date, member, data).
    export async function handleTrelloGetCardActions(args: unknown) {
      try {
        const { credentials, params } = extractCredentials(args);
        const { cardId, filter, limit} = validateGetCardActions(params);
        const client = new TrelloClient(credentials);
    
        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
        };
      }
    }
  • Tool definition with input schema. Defines 'trello_get_card_actions' tool with parameters: cardId (required), filter (enum: all/commentCard/updateCard/createCard, default commentCard), limit (1-1000, default 50), plus optional apiKey and token.
    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 (optional if TRELLO_API_KEY env var is set)'
          },
          token: {
            type: 'string',
            description: 'Trello API token (optional if TRELLO_TOKEN env var is set)'
          },
          cardId: {
            type: 'string',
            description: 'ID or URL of the card (e.g. "abc123" or "https://trello.com/c/abc123/1-title")',
    
          },
          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: ['cardId']
      }
    };
  • Validation schema for getCardActions using Zod. Validates cardId (trelloIdSchema), filter (optional string), and limit (optional number 1-1000).
    const validateGetCardActions = (args: unknown) => {
      const schema = z.object({
    
        cardId: trelloIdSchema,
        filter: z.string().optional(),
        limit: z.number().min(1).max(1000).optional()
      });
    
      return schema.parse(args);
    };
  • TrelloClient.getCardActions() method that makes the actual API call to GET /cards/{cardId}/actions with optional filter and limit parameters.
    async getCardActions(cardId: string, options?: {
      filter?: string;
      limit?: number;
    }): Promise<TrelloApiResponse<TrelloAction[]>> {
      const params: Record<string, string> = {};
    
      if (options?.filter) {
        params.filter = options.filter;
      }
      if (options?.limit) {
        params.limit = options.limit.toString();
      }
    
      return this.makeRequest<TrelloAction[]>(
        `/cards/${cardId}/actions`,
        { params },
        `Get actions for card ${cardId}`
      );
    }
  • src/server.ts:53-54 (registration)
    Import of trelloGetCardActionsTool and handleTrelloGetCardActions from advanced.ts into the server module.
    trelloGetCardActionsTool,
    handleTrelloGetCardActions,
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the tool's read-only nature and what it returns (activity history and comments). However, with no annotations provided, it could be more informative about default filters, pagination, or ordering. The current description is adequate but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no fluff. The first sentence front-loads the verb and resource, and the second provides a use case. Every part is relevant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, no output schema, many sibling tools), the description is too brief. It does not explain the structure of returned actions, default order, or how to interpret results, leaving gaps for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage, so the description does not need to compensate. It adds minimal value beyond the schema, merely implying the need for a card ID and optional filters. No additional semantics are provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get activity history and comments') and the target resource ('specific Trello card'), distinguishing it from sibling tools like trello_get_card_attachments or trello_get_card_checklists.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Useful for tracking changes and discussions' provides implied context for when to use the tool, but there is no explicit guidance on when not to use it or how it compares to alternatives like trello_get_card (which fetches card details) or trello_add_comment (for adding comments).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/agrath/Trello-Desktop-MCP'

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