Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

get_user

Retrieve user details from Zendesk by providing a user ID to access customer information and support data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser ID

Implementation Reference

  • Handler function that implements the core logic of the 'get_user' tool by calling the Zendesk client to fetch user data by ID and handling the response or errors.
    handler: async ({ id }) => { try { const result = await zendeskClient.getUser(id); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting user: ${error.message}` }], isError: true }; }
  • Zod input schema defining the 'id' parameter as a required number for the 'get_user' tool.
    schema: { id: z.number().describe("User ID") },
  • src/server.js:48-52 (registration)
    Registers the 'get_user' tool (along with others) with the MCP server using server.tool().
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • Helper method in ZendeskClient that performs the API GET request to fetch a user by ID, used by the tool handler.
    async getUser(id) { return this.request("GET", `/users/${id}.json`);

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