Skip to main content
Glama

add-label

Add a label to a Trello card using its ID and label ID to organize and categorize tasks.

Input Schema

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

Implementation Reference

  • Handler function for the 'add_label' MCP tool. It retrieves the label service from the service factory and calls addLabelToCard with the provided cardId and labelId, returning a success message.
    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' }; },
  • Registration of the 'add_label' tool in the cardTools array, including name, description, and input schema for MCP registration.
    { 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"] } },
  • Helper service method in LabelService that implements the core logic by posting to Trello API endpoint /cards/{cardId}/idLabels with the labelId.
    async addLabelToCard(cardId: string, labelId: string): Promise<void> { return this.trelloService.post<void>(`/cards/${cardId}/idLabels`, { value: labelId }); }

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