update_group
Modify Zendesk group details by updating the group ID, name, or description using the Zendesk API MCP Server. Streamline group management for support, talk, chat, and guide products.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Updated group description | |
| id | Yes | Group ID to update | |
| name | No | Updated group name |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"description": {
"description": "Updated group description",
"type": "string"
},
"id": {
"description": "Group ID to update",
"type": "number"
},
"name": {
"description": "Updated group name",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
Implementation Reference
- src/tools/groups.js:90-110 (handler)Handler function for the update_group tool that validates input, prepares group data, calls the Zendesk client to update the group, and formats the response.handler: async ({ id, name, description }) => { try { const groupData = {}; if (name !== undefined) groupData.name = name; if (description !== undefined) groupData.description = description; const result = await zendeskClient.updateGroup(id, groupData); return { content: [{ type: "text", text: `Group updated successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error updating group: ${error.message}` }], isError: true }; } }
- src/tools/groups.js:85-89 (schema)Zod schema defining the input parameters for the update_group tool: group ID (required), optional name and description.schema: { id: z.number().describe("Group ID to update"), name: z.string().optional().describe("Updated group name"), description: z.string().optional().describe("Updated group description") },
- src/tools/groups.js:82-111 (registration)Tool registration object defining name, description, schema, and handler for 'update_group', exported as part of groupsTools array and registered in the MCP server.{ name: "update_group", description: "Update an existing group", schema: { id: z.number().describe("Group ID to update"), name: z.string().optional().describe("Updated group name"), description: z.string().optional().describe("Updated group description") }, handler: async ({ id, name, description }) => { try { const groupData = {}; if (name !== undefined) groupData.name = name; if (description !== undefined) groupData.description = description; const result = await zendeskClient.updateGroup(id, groupData); return { content: [{ type: "text", text: `Group updated successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error updating group: ${error.message}` }], isError: true }; } } },
- src/zendesk-client.js:157-159 (helper)Helper method in ZendeskClient that performs the actual API PUT request to update a group via the generic request method.async updateGroup(id, data) { return this.request("PUT", `/groups/${id}.json`, { group: data }); }
- src/server.js:48-52 (registration)Generic registration loop in the main MCP server that registers all tools, including update_group from groupsTools.allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });