Skip to main content
Glama

add-comment

Add comments to Trello cards by specifying the card ID and comment text, enabling direct communication and task updates within the Trello platform.

Input Schema

NameRequiredDescriptionDefault
cardIdYesID of the card to comment on
textYesComment text

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "cardId": { "description": "ID of the card to comment on", "type": "string" }, "text": { "description": "Comment text", "type": "string" } }, "required": [ "cardId", "text" ], "type": "object" }

Implementation Reference

  • Handler function for the 'add_comment' tool. It extracts cardId and text from arguments and delegates to CardService.addComment to perform the operation.
    add_comment: async (args: any) => { const cardService = ServiceFactory.getInstance().getCardService(); return cardService.addComment(args.cardId, args.text); },
  • Tool schema definition for 'add_comment', including name, description, and input validation schema requiring cardId and text.
    name: "add_comment", description: "Add a comment to a card. Use this tool to add notes or feedback to a card.", inputSchema: { type: "object", properties: { cardId: { type: "string", description: "ID of the card" }, text: { type: "string", description: "Text of the comment" } }, required: ["cardId", "text"] } },
  • Core service method that makes the Trello API POST request to add a comment action to the specified card.
    async addComment(cardId: string, text: string): Promise<any> { return this.trelloService.post<any>(`/cards/${cardId}/actions/comments`, { text }); }
  • Aggregates all tool handlers, including cardToolHandlers containing 'add_comment', for registration in the MCP server.
    export const trelloToolHandlers = { ...boardToolHandlers, ...listToolHandlers, ...cardToolHandlers, ...memberToolHandlers, ...labelToolHandlers, ...checklistToolHandlers };
  • src/index.ts:92-96 (registration)
    Registers the list tools handler which returns all tools including 'add_comment' from aggregated trelloTools.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: trelloTools }; });

Other Tools

Related 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/v4lheru/trello-mcp-server'

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