add-comments
Add comments to Trello cards programmatically using a structured input format. Streamlines team collaboration by automating comment creation on specific cards within your Trello boards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comments | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"comments": {
"items": {
"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"
},
"type": "array"
}
},
"required": [
"comments"
],
"type": "object"
}
Implementation Reference
- src/tools/card-tool-handlers.ts:91-98 (handler)MCP tool handler for 'add_comment' that delegates to CardService.addComment(cardId, text). Note: tool name is 'add_comment' (singular).* Add a comment to a card * @param args - Tool arguments * @returns Promise resolving to the created comment */ add_comment: async (args: any) => { const cardService = ServiceFactory.getInstance().getCardService(); return cardService.addComment(args.cardId, args.text); },
- src/tools/card-tools.ts:277-294 (schema)Input schema and definition for the 'add_comment' tool, included in the list returned by listTools.{ 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"] } },
- src/services/card-service.ts:139-147 (helper)Core implementation in CardService that performs the Trello API POST to add a comment./** * Add a comment to a card * @param cardId - ID of the card * @param text - Comment text * @returns Promise resolving to the created comment */ async addComment(cardId: string, text: string): Promise<any> { return this.trelloService.post<any>(`/cards/${cardId}/actions/comments`, { text }); }
- src/tools/trello-tool-handlers.ts:18-25 (registration)Registration of cardToolHandlers (including add_comment handler) into the top-level trelloToolHandlers object, imported and dispatched in src/index.ts.export const trelloToolHandlers = { ...boardToolHandlers, ...listToolHandlers, ...cardToolHandlers, ...memberToolHandlers, ...labelToolHandlers, ...checklistToolHandlers };