Skip to main content
Glama

add-label

Associate a specific label with a Trello card by providing the card ID and label ID. Simplify card organization and management on Trello boards.

Input Schema

NameRequiredDescriptionDefault
cardIdYesID of the card to add the label to
labelIdYesID of the label to add

Input Schema (JSON Schema)

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

Implementation Reference

  • The handler function that implements the logic for the 'add_label' MCP tool. It retrieves the LabelService and calls addLabelToCard with the provided cardId and labelId, returning a success message.
    * Add a label to a card * @param args - Tool arguments * @returns Promise resolving when the operation is complete */ add_label: async (args: any) => { const labelService = ServiceFactory.getInstance().getLabelService(); await labelService.addLabelToCard(args.cardId, args.labelId); return { success: true, message: 'Label added to card successfully' }; },
  • The schema definition for the 'add_label' tool, including input schema for validation of cardId and labelId parameters.
    { name: "add_label", description: "Add a label to a card. Use this tool to categorize a card.", inputSchema: { type: "object", properties: { cardId: { type: "string", description: "ID of the card" }, labelId: { type: "string", description: "ID of the label to add" } }, required: ["cardId", "labelId"] } },
  • The underlying service method called by the tool handler, which makes the Trello API POST request to add the label ID to the card's idLabels.
    async addLabelToCard(cardId: string, labelId: string): Promise<void> { return this.trelloService.post<void>(`/cards/${cardId}/idLabels`, { value: labelId }); }

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