get_automation
Retrieve a specific automation from Zendesk by providing its ID to manage automated workflows for tickets, users, or organizations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Automation ID |
Implementation Reference
- src/tools/automations.js:36-51 (handler)The main handler function for the 'get_automation' tool. It fetches the automation by ID using the Zendesk client and returns the result as formatted JSON or an error message.handler: async ({ id }) => { try { const result = await zendeskClient.getAutomation(id); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting automation: ${error.message}` }], isError: true }; } }
- src/tools/automations.js:33-35 (schema)Zod input schema for the 'get_automation' tool, defining the required 'id' parameter as a number.schema: { id: z.number().describe("Automation ID") },
- src/server.js:48-52 (registration)Registration of the tool with the MCP server via server.tool(), where 'get_automation' is included in allTools from automationsTools.allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:233-235 (helper)Helper method in ZendeskClient that performs the actual API GET request to retrieve a specific automation by ID.async getAutomation(id) { return this.request("GET", `/automations/${id}.json`); }