Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

create_trigger

Automates ticket management by creating Zendesk triggers that execute specific actions based on defined conditions, streamlining support workflows.

Input Schema

NameRequiredDescriptionDefault
actionsYesActions to perform when trigger conditions are met
conditionsYesConditions for the trigger
descriptionNoTrigger description
titleYesTrigger title

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "actions": { "description": "Actions to perform when trigger conditions are met", "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": "Conditions for the trigger", "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": "Trigger description", "type": "string" }, "title": { "description": "Trigger title", "type": "string" } }, "required": [ "title", "conditions", "actions" ], "type": "object" }

Implementation Reference

  • MCP tool handler for 'create_trigger': validates inputs implicitly via schema, builds triggerData object, calls zendeskClient.createTrigger, formats success/error response.
    handler: async ({ title, description, conditions, actions }) => { try { const triggerData = { title, description, conditions, actions }; const result = await zendeskClient.createTrigger(triggerData); return { content: [{ type: "text", text: `Trigger created successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating trigger: ${error.message}` }], isError: true }; } }
  • Input schema for create_trigger tool using Zod: defines title (required), description (opt), conditions (all/any arrays of field/operator/value), actions (array of field/value).
    schema: { title: z.string().describe("Trigger title"), description: z.string().optional().describe("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() }).describe("Conditions for the trigger"), actions: z.array(z.object({ field: z.string().describe("Field to modify"), value: z.any().describe("Value to set") })).describe("Actions to perform when trigger conditions are met") },
  • src/server.js:48-52 (registration)
    Registration of all tools (including create_trigger from triggersTools) to the MCP server via server.tool() call in loop.
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • ZendeskClient helper method invoked by the tool handler: sends POST request to Zendesk Triggers API endpoint /triggers.json with trigger data.
    async createTrigger(data) { return this.request("POST", "/triggers.json", { trigger: data });
  • src/server.js:38-38 (registration)
    Inclusion of triggersTools (containing create_trigger) into the allTools array for registration.
    ...triggersTools,

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