Skip to main content
Glama

trello_add_comment

Add notes, updates, or discussions to Trello cards to track progress and collaborate with team members.

Instructions

Add a comment to a Trello card. Use this to add notes, updates, or discussions to cards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYesTrello API key (automatically provided by Claude.app from your stored credentials)
tokenYesTrello API token (automatically provided by Claude.app from your stored credentials)
cardIdYesID of the card to add comment to (you can get this from board details or searches)
textYesText content of the comment

Implementation Reference

  • The handleTrelloAddComment function handles the logic for adding a comment to a Trello card.
    export async function handleTrelloAddComment(args: unknown) {
      try {
        const { apiKey, token, cardId, text } = validateAddComment(args);
        const client = new TrelloClient({ apiKey, token });
        
        const response = await client.addCommentToCard(cardId, text);
        const comment = response.data;
        
        const result = {
          summary: `Added comment to card ${cardId}`,
          comment: {
            id: comment.id,
            type: comment.type,
            date: comment.date,
            memberCreator: comment.memberCreator ? {
              id: comment.memberCreator.id,
              fullName: comment.memberCreator.fullName,
              username: comment.memberCreator.username
            } : null,
            data: {
              text: comment.data?.text,
              card: comment.data?.card ? {
                id: comment.data.card.id,
                name: comment.data.card.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 
  • The trelloAddCommentTool object defines the tool name, description, and input schema.
    export const trelloAddCommentTool: Tool = {
      name: 'trello_add_comment',
      description: 'Add a comment to a Trello card. Use this to add notes, updates, or discussions to cards.',
      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 add comment to (you can get this from board details or searches)',
            pattern: '^[a-f0-9]{24}$'
          },
          text: {
            type: 'string',
            description: 'Text content of the comment',
            minLength: 1
          }
        },
        required: ['apiKey', 'token', 'cardId', 'text']
      }
    };

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

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