delete-label
Remove specific labels from Trello cards by providing the label ID, streamlining project organization and management in the Advanced Trello MCP Server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| labelId | Yes | ID of the label to delete |
Implementation Reference
- src/tools/labels.ts:319-369 (registration)Registration of the 'delete-label' tool including inline schema (labelId) and handler function that performs DELETE request to Trello API endpoint /labels/{id} to delete the specified label.server.tool( 'delete-label', { labelId: z.string().describe('ID of the label to delete') }, async ({ labelId }) => { try { if (!credentials.apiKey || !credentials.apiToken) { return { content: [ { type: 'text', text: 'Trello API credentials are not configured', }, ], isError: true, }; } const response = await fetch( `https://api.trello.com/1/labels/${labelId}?key=${credentials.apiKey}&token=${credentials.apiToken}`, { method: 'DELETE', 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 deleting label: ${error}`, }, ], isError: true, }; } } );