Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

list_users

Retrieve and filter users from Zendesk Support by role, page, or per page count to manage user data efficiently.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number for pagination
per_pageNoNumber of users per page (max 100)
roleNoFilter users by role

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 users per page (max 100)", "type": "number" }, "role": { "description": "Filter users by role", "enum": [ "end-user", "agent", "admin" ], "type": "string" } }, "type": "object" }

Implementation Reference

  • The handler function that implements the core logic of the 'list_users' tool. It prepares parameters, calls the Zendesk client to list users, formats the result as JSON text response, and handles errors.
    handler: async ({ page, per_page, role }) => { try { const params = { page, per_page, role }; const result = await zendeskClient.listUsers(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing users: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameters for the list_users tool: optional page, per_page, and role filters.
    schema: { page: z.number().optional().describe("Page number for pagination"), per_page: z.number().optional().describe("Number of users per page (max 100)"), role: z.enum(["end-user", "agent", "admin"]).optional().describe("Filter users by role") },
  • src/server.js:48-52 (registration)
    Registration of the 'list_users' tool (via usersTools array) to the MCP server using server.tool() in a loop over all imported tools.
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • Helper method in ZendeskClient that makes the API request to /users.json with parameters for listing users.
    async listUsers(params) { return this.request("GET", "/users.json", null, params);

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