Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

create_view

Create custom views in Zendesk by defining a title and conditions to filter and organize tickets based on specific criteria.

Input Schema

NameRequiredDescriptionDefault
conditionsYesConditions for the view
descriptionNoView description
titleYesView title

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "conditions": { "additionalProperties": false, "description": "Conditions for the view", "properties": { "all": { "items": { "additionalProperties": false, "properties": { "field": { "description": "Field to filter on", "type": "string" }, "operator": { "description": "Operator for comparison", "type": "string" }, "value": { "description": "Value to compare against" } }, "required": [ "field", "operator" ], "type": "object" }, "type": "array" }, "any": { "items": { "additionalProperties": false, "properties": { "field": { "description": "Field to filter on", "type": "string" }, "operator": { "description": "Operator for comparison", "type": "string" }, "value": { "description": "Value to compare against" } }, "required": [ "field", "operator" ], "type": "object" }, "type": "array" } }, "type": "object" }, "description": { "description": "View description", "type": "string" }, "title": { "description": "View title", "type": "string" } }, "required": [ "title", "conditions" ], "type": "object" }

Implementation Reference

  • The handler function for the 'create_view' MCP tool. It constructs the view data from inputs (title, description, conditions) and delegates to zendeskClient.createView, returning formatted success/error responses.
    handler: async ({ title, description, conditions }) => { try { const viewData = { title, description, conditions }; const result = await zendeskClient.createView(viewData); return { content: [{ type: "text", text: `View created successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating view: ${error.message}` }], isError: true }; }
  • Zod input schema for 'create_view' tool: required title (string), optional description (string), and conditions object with optional 'all' and 'any' arrays of {field, operator, value} filters.
    schema: { title: z.string().describe("View title"), description: z.string().optional().describe("View description"), conditions: z.object({ all: z.array(z.object({ field: z.string().describe("Field to filter on"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional(), any: z.array(z.object({ field: z.string().describe("Field to filter on"), operator: z.string().describe("Operator for comparison"), value: z.any().describe("Value to compare against") })).optional() }).describe("Conditions for the view") },
  • src/server.js:48-52 (registration)
    Bulk registration of all MCP tools (including 'create_view' from viewsTools) by iterating over allTools array and calling server.tool(name, schema, handler, {description}).
    allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
  • ZendeskClient helper method that performs the actual API POST request to /views.json with {view: data} to create the view, called by the tool handler.
    async createView(data) { return this.request("POST", "/views.json", { view: data }); }

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