delete_trigger
Remove a trigger from Zendesk Support by specifying its ID to streamline automation rules and ticket workflows.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Trigger ID to delete |
Implementation Reference
- src/tools/triggers.js:154-169 (handler)The handler function that executes the 'delete_trigger' tool logic. It calls the zendeskClient.deleteTrigger(id) and handles the response or error.
handler: async ({ id }) => { try { await zendeskClient.deleteTrigger(id); return { content: [{ type: "text", text: `Trigger ${id} deleted successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error deleting trigger: ${error.message}` }], isError: true }; } } - src/tools/triggers.js:151-153 (schema)Zod schema defining the input parameter 'id' for the delete_trigger tool.
schema: { id: z.number().describe("Trigger ID to delete") }, - src/server.js:31-52 (registration)Registration of all tools including 'delete_trigger' via the triggersTools array imported earlier. The forEach loop calls server.tool for each tool.
const allTools = [ ...ticketsTools, ...usersTools, ...organizationsTools, ...groupsTools, ...macrosTools, ...viewsTools, ...triggersTools, ...automationsTools, ...searchTools, ...helpCenterTools, ...supportTools, ...talkTools, ...chatTools, ]; // Register each tool with the server allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); }); - src/zendesk-client.js:224-226 (helper)Supporting utility function in ZendeskClient that performs the actual DELETE request to the Zendesk Triggers API endpoint.
async deleteTrigger(id) { return this.request("DELETE", `/triggers/${id}.json`); }