Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

list_organizations

Retrieve and manage Zendesk organizations with pagination support. Define page numbers and limit results per page (up to 100) for efficient organization management via the Zendesk API.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number for pagination
per_pageNoNumber of organizations per page (max 100)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "page": { "description": "Page number for pagination", "type": "number" }, "per_page": { "description": "Number of organizations per page (max 100)", "type": "number" } }, "type": "object" }

Implementation Reference

  • The asynchronous handler function for the 'list_organizations' MCP tool. It constructs params, invokes zendeskClient.listOrganizations, returns formatted JSON response or error.
    handler: async ({ page, per_page }) => { try { const params = { page, per_page }; const result = await zendeskClient.listOrganizations(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing organizations: ${error.message}` }], isError: true }; } }
  • Zod input schema defining optional pagination parameters: page and per_page.
    schema: { page: z.number().optional().describe("Page number for pagination"), per_page: z.number().optional().describe("Number of organizations per page (max 100)") },
  • Tool definition object for 'list_organizations' exported in organizationsTools array.
    { name: "list_organizations", description: "List organizations in Zendesk", schema: { page: z.number().optional().describe("Page number for pagination"), per_page: z.number().optional().describe("Number of organizations per page (max 100)") }, handler: async ({ page, per_page }) => { try { const params = { page, per_page }; const result = await zendeskClient.listOrganizations(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error listing organizations: ${error.message}` }], isError: true }; } } },
  • src/server.js:31-52 (registration)
    Collection of all tool arrays (including organizationsTools) into allTools and registration loop calling server.tool() for each tool.
    const allTools = [ ...ticketsTools, ...usersTools, ...organizationsTools, ...groupsTools, ...macrosTools, ...viewsTools, ...triggersTools, ...automationsTools, ...searchTools, ...helpCenterTools, ...supportTools, ...talkTools, ...chatTools, ]; // Register each tool with the server allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • ZendeskClient helper method that performs the actual API GET request to /organizations.json with params.
    async listOrganizations(params) { return this.request("GET", "/organizations.json", null, params); }

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