Skip to main content
Glama

create-label

Generate and manage labels on Trello boards using board ID, label name, and color. Simplify organization and categorization of tasks directly through the Trello API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesID of the board to create the label in
colorYesColor of the label
nameYesName of the label

Implementation Reference

  • The handler function that executes the tool logic by delegating to the LabelService.createLabel method.
    create_label: async (args: any) => { const labelService = ServiceFactory.getInstance().getLabelService(); return labelService.createLabel(args.boardId, args.name, args.color); },
  • The JSON schema definition and metadata for the 'create_label' tool, including input parameters.
    { name: "create_label", description: "Create a new label on a board. Use this tool when you need to add a new label to a board for categorizing cards.", inputSchema: { type: "object", properties: { boardId: { type: "string", description: "ID of the board" }, name: { type: "string", description: "Name of the label" }, color: { type: ["string", "null"], enum: ["green", "yellow", "orange", "red", "purple", "blue", "sky", "lime", "pink", "black", null], description: "Color of the label, or null for no color" } }, required: ["boardId", "name", "color"] } },
  • Registration of labelToolHandlers (including create_label handler) into the combined trelloToolHandlers object used by the MCP server.
    import { boardToolHandlers } from './board-tool-handlers.js'; import { listToolHandlers } from './list-tool-handlers.js'; import { cardToolHandlers } from './card-tool-handlers.js'; import { memberToolHandlers } from './member-tool-handlers.js'; import { labelToolHandlers } from './label-tool-handlers.js'; import { checklistToolHandlers } from './checklist-tool-handlers.js'; /** * All Trello tool handlers combined into a single object */ export const trelloToolHandlers = { ...boardToolHandlers, ...listToolHandlers, ...cardToolHandlers, ...memberToolHandlers, ...labelToolHandlers, ...checklistToolHandlers };
  • Registration of labelTools (including create_label schema) into the combined trelloTools array used by the MCP server.
    import { boardTools } from './board-tools.js'; import { listTools } from './list-tools.js'; import { cardTools } from './card-tools.js'; import { memberTools } from './member-tools.js'; import { labelTools } from './label-tools.js'; import { checklistTools } from './checklist-tools.js'; /** * All Trello tools combined into a single array */ export const trelloTools = [ ...boardTools, ...listTools, ...cardTools, ...memberTools, ...labelTools, ...checklistTools ];
  • The underlying service method that performs the actual API call to Trello to create the label.
    async createLabel( boardId: string, name: string, color: 'green' | 'yellow' | 'orange' | 'red' | 'purple' | 'blue' | 'sky' | 'lime' | 'pink' | 'black' | null ): Promise<TrelloLabel> { return this.trelloService.post<TrelloLabel>('/labels', { idBoard: boardId, name, color }); }

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