Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

get_macro

Retrieve specific Zendesk macros by ID using the Zendesk API MCP Server, enabling efficient management and access to predefined ticket responses and workflows.

Input Schema

NameRequiredDescriptionDefault
idYesMacro ID

Input Schema (JSON Schema)

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

Implementation Reference

  • The handler function that executes the 'get_macro' tool logic: fetches the macro via Zendesk client and returns JSON-formatted result or error.
    handler: async ({ id }) => { try { const result = await zendeskClient.getMacro(id); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting macro: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input for 'get_macro': requires a numeric 'id' parameter.
    schema: { id: z.number().describe("Macro ID") },
  • Tool definition object for 'get_macro' exported as part of macrosTools array, which is later registered in the MCP server.
    { name: "get_macro", description: "Get a specific macro by ID", schema: { id: z.number().describe("Macro ID") }, handler: async ({ id }) => { try { const result = await zendeskClient.getMacro(id); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting macro: ${error.message}` }], isError: true }; } } },
  • ZendeskClient helper method that makes the HTTP GET request to the Zendesk API to retrieve a macro by ID.
    async getMacro(id) { return this.request("GET", `/macros/${id}.json`); }
  • src/server.js:48-52 (registration)
    Generic registration loop in MCP server that registers all tools including 'get_macro' from macrosTools.
    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