Skip to main content
Glama

Zendesk API MCP Server

update_user

Modify user details in Zendesk by updating name, email, role, phone, organization, tags, or notes using the Zendesk API MCP Server.

Input Schema

NameRequiredDescriptionDefault
emailNoUpdated email address
idYesUser ID to update
nameNoUpdated user's name
notesNoUpdated notes about the user
organization_idNoUpdated organization ID
phoneNoUpdated phone number
roleNoUpdated user's role
tagsNoUpdated tags for the user

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "email": { "description": "Updated email address", "format": "email", "type": "string" }, "id": { "description": "User ID to update", "type": "number" }, "name": { "description": "Updated user's name", "type": "string" }, "notes": { "description": "Updated notes about the user", "type": "string" }, "organization_id": { "description": "Updated organization ID", "type": "number" }, "phone": { "description": "Updated phone number", "type": "string" }, "role": { "description": "Updated user's role", "enum": [ "end-user", "agent", "admin" ], "type": "string" }, "tags": { "description": "Updated tags for the user", "items": { "type": "string" }, "type": "array" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • The handler function for the 'update_user' tool. It conditionally constructs a userData object from provided optional parameters and delegates the API call to zendeskClient.updateUser, handling success and error responses.
    handler: async ({ id, name, email, role, phone, organization_id, tags, notes }) => { try { const userData = {}; if (name !== undefined) userData.name = name; if (email !== undefined) userData.email = email; if (role !== undefined) userData.role = role; if (phone !== undefined) userData.phone = phone; if (organization_id !== undefined) userData.organization_id = organization_id; if (tags !== undefined) userData.tags = tags; if (notes !== undefined) userData.notes = notes; const result = await zendeskClient.updateUser(id, userData); return { content: [{ type: "text", text: `User updated successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error updating user: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameters for the 'update_user' tool, including required user ID and optional fields for update.
    schema: { id: z.number().describe("User ID to update"), name: z.string().optional().describe("Updated user's name"), email: z.string().email().optional().describe("Updated email address"), role: z.enum(["end-user", "agent", "admin"]).optional().describe("Updated user's role"), phone: z.string().optional().describe("Updated phone number"), organization_id: z.number().optional().describe("Updated organization ID"), tags: z.array(z.string()).optional().describe("Updated tags for the user"), notes: z.string().optional().describe("Updated notes about the user") },
  • src/server.js:48-52 (registration)
    Dynamic registration of all tools, including 'update_user' from usersTools, by iterating over allTools and calling server.tool(name, schema, handler).
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • Helper method in ZendeskClient that performs the actual PUT request to the Zendesk API to update a user.
    async updateUser(id, data) { return this.request("PUT", `/users/${id}.json`, { user: data }); }

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