Skip to main content
Glama

update-label-field

Modify Trello label properties by updating either the name or color field using the label ID and new value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelIdYesID of the label to update
fieldYesField to update (name or color)
valueYesNew value for the field

Implementation Reference

  • The handler function that implements the 'update-label-field' tool logic. It constructs a PUT request to the Trello API endpoint `/labels/{labelId}/{field}` with the value as query param and returns the response or error.
    'update-label-field', { labelId: z.string().describe('ID of the label to update'), field: z.enum(['name', 'color']).describe('Field to update (name or color)'), value: z.string().describe('New value for the field') }, async ({ labelId, field, value }) => { try { if (!credentials.apiKey || !credentials.apiToken) { return { content: [ { type: 'text', text: 'Trello API credentials are not configured', }, ], isError: true, }; } const url = new URL(`https://api.trello.com/1/labels/${labelId}/${field}`); url.searchParams.append('key', credentials.apiKey); url.searchParams.append('token', credentials.apiToken); url.searchParams.append('value', value); const response = await fetch(url.toString(), { method: 'PUT', headers: { 'Content-Type': 'application/json', }, }); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error updating label field: ${error}`, }, ], isError: true, }; } } );
  • Zod input schema defining parameters: labelId (string), field (enum 'name' or 'color'), value (string).
    labelId: z.string().describe('ID of the label to update'), field: z.enum(['name', 'color']).describe('Field to update (name or color)'), value: z.string().describe('New value for the field') },
  • src/index.ts:91-91 (registration)
    Invocation of registerLabelsTools which registers the 'update-label-field' tool (and other labels tools) on the MCP server.
    registerLabelsTools(server, credentials);

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/adriangrahldev/advanced-trello-mcp-server'

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