Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

update_trigger

Modify Zendesk triggers by updating their title, description, conditions, or actions using the associated trigger ID for precise automation adjustments.

Input Schema

NameRequiredDescriptionDefault
actionsNoUpdated actions
conditionsNoUpdated conditions
descriptionNoUpdated trigger description
idYesTrigger ID to update
titleNoUpdated trigger title

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "actions": { "description": "Updated actions", "items": { "additionalProperties": false, "properties": { "field": { "description": "Field to modify", "type": "string" }, "value": { "description": "Value to set" } }, "required": [ "field" ], "type": "object" }, "type": "array" }, "conditions": { "additionalProperties": false, "description": "Updated conditions", "properties": { "all": { "items": { "additionalProperties": false, "properties": { "field": { "description": "Field to check", "type": "string" }, "operator": { "description": "Operator for comparison", "type": "string" }, "value": { "description": "Value to compare against" } }, "required": [ "field", "operator" ], "type": "object" }, "type": "array" }, "any": { "items": { "additionalProperties": false, "properties": { "field": { "description": "Field to check", "type": "string" }, "operator": { "description": "Operator for comparison", "type": "string" }, "value": { "description": "Value to compare against" } }, "required": [ "field", "operator" ], "type": "object" }, "type": "array" } }, "type": "object" }, "description": { "description": "Updated trigger description", "type": "string" }, "id": { "description": "Trigger ID to update", "type": "number" }, "title": { "description": "Updated trigger title", "type": "string" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • The handler function for the 'update_trigger' tool. It constructs the trigger data from optional parameters and calls zendeskClient.updateTrigger(id, triggerData), then returns success or error response.
    handler: async ({ id, title, description, conditions, actions }) => { try { const triggerData = {}; if (title !== undefined) triggerData.title = title; if (description !== undefined) triggerData.description = description; if (conditions !== undefined) triggerData.conditions = conditions; if (actions !== undefined) triggerData.actions = actions; const result = await zendeskClient.updateTrigger(id, triggerData); return { content: [{ type: "text", text: `Trigger updated successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error updating trigger: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameters for the 'update_trigger' tool: id (required), and optional title, description, conditions, actions.
    schema: { id: z.number().describe("Trigger ID to update"), title: z.string().optional().describe("Updated trigger title"), description: z.string().optional().describe("Updated trigger description"), conditions: z.object({ all: z.array(z.object({ field: z.string().describe("Field to check"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional(), any: z.array(z.object({ field: z.string().describe("Field to check"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional() }).optional().describe("Updated conditions"), actions: z.array(z.object({ field: z.string().describe("Field to modify"), value: z.any().describe("Value to set") })).optional().describe("Updated actions") },
  • src/server.js:48-52 (registration)
    Registration of the 'update_trigger' tool (included in triggersTools) via server.tool() in the loop over allTools.
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • ZendeskClient helper method that makes the PUT request to /triggers/{id}.json API endpoint to update the trigger.
    async updateTrigger(id, data) { return this.request("PUT", `/triggers/${id}.json`, { trigger: data }); }

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/JurreBrandsenInfoSupport/zendesk-mcp'

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