delete-action
Remove specific actions from Trello using their unique IDs. This tool ensures precise deletion of actions, enhancing project management efficiency in the Advanced Trello MCP Server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actionId | Yes | ID of the action to delete |
Implementation Reference
- src/tools/actions.ts:136-180 (handler)The handler function for the 'delete-action' tool. It checks for credentials, sends a DELETE request to the Trello API endpoint /actions/{actionId}, and returns the response or error.async ({ actionId }) => { 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/actions/${actionId}?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 action: ${error}`, }, ], isError: true, }; } }
- src/tools/actions.ts:134-135 (schema)Zod schema defining the input parameter 'actionId' for the 'delete-action' tool.actionId: z.string().describe('ID of the action to delete'), },
- src/tools/actions.ts:131-181 (registration)Registration of the 'delete-action' tool via server.tool call within registerActionsTools function, which is called from src/index.ts.server.tool( 'delete-action', { actionId: z.string().describe('ID of the action to delete'), }, async ({ actionId }) => { 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/actions/${actionId}?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 action: ${error}`, }, ], isError: true, }; } } );