update_group
Modify group details in Zendesk by updating the name and description of an existing group using its ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Group ID to update | |
| name | No | Updated group name | |
| description | No | Updated group description |
Implementation Reference
- src/tools/groups.js:90-110 (handler)MCP tool handler for 'update_group': validates input, constructs group data, calls zendeskClient.updateGroup, and formats response or error.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 input schema for the 'update_group' tool defining parameters: id (required), name and description (optional).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/server.js:48-52 (registration)Registers the 'update_group' tool (along with others) on the MCP server using server.tool with name, schema, handler, and description.allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:157-159 (helper)ZendeskClient helper method that makes the PUT API request to update a group by ID with provided data.async updateGroup(id, data) { return this.request("PUT", `/groups/${id}.json`, { group: data }); }