Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

search

Search and organize Zendesk Support data by query, sort criteria, and pagination settings to efficiently retrieve and manage tickets, users, organizations, and more.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number for pagination
per_pageNoNumber of results per page (max 100)
queryYesSearch query string
sort_byNoField to sort by
sort_orderNoSort order (asc or desc)

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 results per page (max 100)", "type": "number" }, "query": { "description": "Search query string", "type": "string" }, "sort_by": { "description": "Field to sort by", "type": "string" }, "sort_order": { "description": "Sort order (asc or desc)", "enum": [ "asc", "desc" ], "type": "string" } }, "required": [ "query" ], "type": "object" }

Implementation Reference

  • The async handler function that implements the core logic of the 'search' tool. It constructs parameters, calls zendeskClient.search(), formats the result as JSON text content, or returns an error message.
    handler: async ({ query, sort_by, sort_order, page, per_page }) => { try { const params = { sort_by, sort_order, page, per_page }; const result = await zendeskClient.search(query, params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error searching: ${error.message}` }], isError: true }; } }
  • Zod schema defining the input parameters for the 'search' tool, including query (required) and optional sorting/pagination params.
    schema: { query: z.string().describe("Search query string"), sort_by: z.string().optional().describe("Field to sort by"), sort_order: z.enum(["asc", "desc"]).optional().describe("Sort order (asc or desc)"), page: z.number().optional().describe("Page number for pagination"), per_page: z.number().optional().describe("Number of results per page (max 100)") },
  • src/server.js:48-52 (registration)
    Registers all tools including 'search' (from searchTools spread into allTools) with the MCP server by calling server.tool() for each tool's name, schema, handler, and description.
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • Supporting method in ZendeskClient that performs the actual API search request to /search.json, used by the tool handler.
    // Search async search(query, params = {}) { return this.request("GET", "/search.json", null, { query, ...params }); }
  • src/server.js:40-40 (registration)
    Includes the searchTools array (containing the 'search' tool definition) into the allTools array for subsequent registration.
    ...searchTools,

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