list_automations
Retrieve and manage Zendesk automations with pagination support, enabling efficient organization and control of automation workflows on the Zendesk API MCP Server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination | |
| per_page | No | Number of automations 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 automations per page (max 100)",
"type": "number"
}
},
"type": "object"
}
Implementation Reference
- src/tools/automations.js:12-27 (handler)The handler function for the 'list_automations' tool. It prepares parameters, calls the Zendesk client to list automations, and returns the formatted JSON response or an error message.handler: async ({ page, per_page }) => { try { const params = { page, per_page }; const result = await zendeskClient.listAutomations(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing automations: ${error.message}` }], isError: true }; }
- src/tools/automations.js:8-11 (schema)Zod schema defining optional input parameters for pagination: page and per_page.schema: { page: z.number().optional().describe("Page number for pagination"), per_page: z.number().optional().describe("Number of automations per page (max 100)") },
- src/server.js:48-52 (registration)Registration loop where tools from automationsTools (including list_automations) are registered with the MCP server using server.tool().allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/server.js:16-16 (registration)Import of the automationsTools array containing the list_automations tool definition.import { automationsTools } from "./tools/automations.js";
- src/zendesk-client.js:229-230 (helper)Underlying ZendeskClient method that makes the API request to list automations, called by the tool handler.async listAutomations(params) { return this.request("GET", "/automations.json", null, params);