get_automation
Retrieve specific automation details from Zendesk by providing its ID. Simplifies workflow management and integration with Zendesk Support, Talk, Chat, and Guide products.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Automation ID |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "Automation ID",
"type": "number"
}
},
"required": [
"id"
],
"type": "object"
}
Implementation Reference
- src/tools/automations.js:36-51 (handler)Handler function for the get_automation MCP tool. Calls zendeskClient.getAutomation(id) and formats the response as text content or error.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)Input schema for get_automation tool using Zod: requires 'id' as number.schema: { id: z.number().describe("Automation ID") },
- src/server.js:48-52 (registration)MCP server registration loop that registers the get_automation tool (included via automationsTools in allTools).allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:233-235 (helper)ZendeskClient helper method invoked by the tool handler to perform the API request for a specific automation.async getAutomation(id) { return this.request("GET", `/automations/${id}.json`); }