Skip to main content
Glama
JurreBrandsenInfoSupport

Zendesk API MCP Server

create_article

Generate and publish articles in Zendesk Help Center by specifying title, body, section, locale, and permissions. Manage drafts, labels, and user segments for tailored content creation.

Input Schema

NameRequiredDescriptionDefault
bodyYesArticle body content (HTML)
draftNoWhether the article is a draft
label_namesNoLabels for the article
localeNoArticle locale (e.g., 'en-us')
permission_group_idNoPermission group ID for the article
section_idYesSection ID where the article will be created
titleYesArticle title
user_segment_idNoUser segment ID for the article

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "body": { "description": "Article body content (HTML)", "type": "string" }, "draft": { "description": "Whether the article is a draft", "type": "boolean" }, "label_names": { "description": "Labels for the article", "items": { "type": "string" }, "type": "array" }, "locale": { "description": "Article locale (e.g., 'en-us')", "type": "string" }, "permission_group_id": { "description": "Permission group ID for the article", "type": "number" }, "section_id": { "description": "Section ID where the article will be created", "type": "number" }, "title": { "description": "Article title", "type": "string" }, "user_segment_id": { "description": "User segment ID for the article", "type": "number" } }, "required": [ "title", "body", "section_id" ], "type": "object" }

Implementation Reference

  • The handler function for the 'create_article' tool. It processes input parameters, constructs the article data, calls the Zendesk client to create the article, and returns the result or error.
    handler: async ({ title, body, section_id, locale, draft, permission_group_id, user_segment_id, label_names }) => { try { const articleData = { title, body, locale, draft, permission_group_id, user_segment_id, label_names }; const result = await zendeskClient.createArticle(articleData, section_id); return { content: [{ type: "text", text: `Article created successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating article: ${error.message}` }], isError: true }; } }
  • Input schema validation using Zod for the 'create_article' tool parameters.
    schema: { title: z.string().describe("Article title"), body: z.string().describe("Article body content (HTML)"), section_id: z.number().describe("Section ID where the article will be created"), locale: z.string().optional().describe("Article locale (e.g., 'en-us')"), draft: z.boolean().optional().describe("Whether the article is a draft"), permission_group_id: z.number().optional().describe("Permission group ID for the article"), user_segment_id: z.number().optional().describe("User segment ID for the article"), label_names: z.array(z.string()).optional().describe("Labels for the article") },
  • Full tool definition object for 'create_article' exported in helpCenterTools array, which is later registered in the MCP server.
    { name: "create_article", description: "Create a new Help Center article", schema: { title: z.string().describe("Article title"), body: z.string().describe("Article body content (HTML)"), section_id: z.number().describe("Section ID where the article will be created"), locale: z.string().optional().describe("Article locale (e.g., 'en-us')"), draft: z.boolean().optional().describe("Whether the article is a draft"), permission_group_id: z.number().optional().describe("Permission group ID for the article"), user_segment_id: z.number().optional().describe("User segment ID for the article"), label_names: z.array(z.string()).optional().describe("Labels for the article") }, handler: async ({ title, body, section_id, locale, draft, permission_group_id, user_segment_id, label_names }) => { try { const articleData = { title, body, locale, draft, permission_group_id, user_segment_id, label_names }; const result = await zendeskClient.createArticle(articleData, section_id); return { content: [{ type: "text", text: `Article created successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating article: ${error.message}` }], isError: true }; } }
  • ZendeskClient helper method that executes the actual API POST request to create a Help Center article in the specified section.
    async createArticle(data, sectionId) { return this.request( "POST", `/help_center/sections/${sectionId}/articles.json`, { article: data } ); }
  • src/server.js:47-52 (registration)
    MCP server registration loop that registers the 'create_article' tool (included via helpCenterTools) using server.tool().
    // Register each tool with the server allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });

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