Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

get_trigger

Retrieve specific trigger details from Zendesk using the trigger ID to manage and customize ticket automation workflows efficiently.

Input Schema

NameRequiredDescriptionDefault
idYesTrigger ID

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "description": "Trigger ID", "type": "number" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • The handler function that implements the core logic of the 'get_trigger' tool. It fetches the trigger by ID using the Zendesk client and returns a formatted JSON response or an error.
    handler: async ({ id }) => { try { const result = await zendeskClient.getTrigger(id); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting trigger: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameters for the 'get_trigger' tool: a required numeric 'id' for the trigger.
    schema: { id: z.number().describe("Trigger ID") },
  • The complete tool object for 'get_trigger' defined within the triggersTools array, which is imported and registered to the MCP server via server.tool().
    { name: "get_trigger", description: "Get a specific trigger by ID", schema: { id: z.number().describe("Trigger ID") }, handler: async ({ id }) => { try { const result = await zendeskClient.getTrigger(id); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting trigger: ${error.message}` }], isError: true }; } } },
  • Helper method in ZendeskClient that performs the actual API request to retrieve a specific trigger by ID.
    async getTrigger(id) { return this.request("GET", `/triggers/${id}.json`);
  • src/server.js:48-52 (registration)
    Generic registration loop that registers all tools, including 'get_trigger' from triggersTools, to the MCP server.
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });

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