get_group
Retrieve detailed information about a specific group in Zendesk by providing its Group ID. Integrates with the Zendesk API MCP Server for efficient group management.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Group ID |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "Group ID",
"type": "number"
}
},
"required": [
"id"
],
"type": "object"
}
Implementation Reference
- src/tools/groups.js:36-51 (handler)The handler function for the 'get_group' tool. It takes a group ID, fetches the group data using zendeskClient.getGroup(id), and returns the JSON-formatted result or an error message.handler: async ({ id }) => { try { const result = await zendeskClient.getGroup(id); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error getting group: ${error.message}` }], isError: true }; } }
- src/tools/groups.js:33-35 (schema)Input schema for the 'get_group' tool, validating the 'id' parameter as a number with description.schema: { id: z.number().describe("Group ID") },
- src/server.js:48-52 (registration)Registration loop that registers the 'get_group' tool (imported via groupsTools) with the MCP server by calling server.tool() for each tool in allTools.allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:149-151 (helper)Helper method in ZendeskClient that performs the actual API request to retrieve a specific group by ID.async getGroup(id) { return this.request("GET", `/groups/${id}.json`); }
- src/server.js:35-35 (registration)Includes the groupsTools array (containing 'get_group') into the allTools array for registration....groupsTools,