Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

delete_macro

Remove unwanted macros by specifying the ID using the tool on the Zendesk API MCP Server, streamlining macro management and ensuring clean workflows.

Input Schema

NameRequiredDescriptionDefault
idYesMacro ID to delete

Input Schema (JSON Schema)

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

Implementation Reference

  • The handler function that implements the core logic of the delete_macro tool by invoking the Zendesk client's deleteMacro method and handling the response.
    handler: async ({ id }) => { try { await zendeskClient.deleteMacro(id); return { content: [{ type: "text", text: `Macro ${id} deleted successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error deleting macro: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameter 'id' as a number for the delete_macro tool.
    schema: { id: z.number().describe("Macro ID to delete") },
  • The tool definition object for 'delete_macro' which is exported as part of macrosTools and later registered with the MCP server.
    { name: "delete_macro", description: "Delete a macro", schema: { id: z.number().describe("Macro ID to delete") }, handler: async ({ id }) => { try { await zendeskClient.deleteMacro(id); return { content: [{ type: "text", text: `Macro ${id} deleted successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error deleting macro: ${error.message}` }], isError: true }; } } }
  • Helper method in ZendeskClient that performs the actual API DELETE request to remove the macro.
    async deleteMacro(id) { return this.request("DELETE", `/macros/${id}.json`); }
  • src/server.js:48-52 (registration)
    Generic registration of all tools, including delete_macro from macrosTools, with 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