Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

list_triggers

Retrieve and manage Zendesk triggers by specifying page numbers and items per page, enabling efficient organization and automation of support workflows.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number for pagination
per_pageNoNumber of triggers per page (max 100)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "page": { "description": "Page number for pagination", "type": "number" }, "per_page": { "description": "Number of triggers per page (max 100)", "type": "number" } }, "type": "object" }

Implementation Reference

  • The handler function for the 'list_triggers' tool. It constructs parameters from input, calls zendeskClient.listTriggers, and returns the JSON-stringified result or an error message.
    handler: async ({ page, per_page }) => { try { const params = { page, per_page }; const result = await zendeskClient.listTriggers(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing triggers: ${error.message}` }], isError: true }; }
  • Zod schema defining the input parameters for the 'list_triggers' tool: optional page and per_page numbers.
    schema: { page: z.number().optional().describe("Page number for pagination"), per_page: z.number().optional().describe("Number of triggers per page (max 100)") },
  • src/server.js:31-52 (registration)
    Registration of all tools, including 'list_triggers' from triggersTools, into the MCP server using 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, }); });
  • Local definition of the 'list_triggers' tool object within the exported triggersTools array, including name, description, schema, and handler.
    { name: "list_triggers", description: "List triggers in Zendesk", schema: { page: z.number().optional().describe("Page number for pagination"), per_page: z.number().optional().describe("Number of triggers per page (max 100)") }, handler: async ({ page, per_page }) => { try { const params = { page, per_page }; const result = await zendeskClient.listTriggers(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing triggers: ${error.message}` }], isError: true }; } } },
  • Helper method in ZendeskClient that performs the actual API request to list triggers using the generic request method.
    async listTriggers(params) { return this.request("GET", "/triggers.json", null, params);

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