@fruggr/zendesk-mcp-server 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -775,6 +775,9 @@ const helpCenterPut = (subdomain, token, path, body) => {
775
775
  body
776
776
  });
777
777
  };
778
+ const helpCenterDelete = (subdomain, token, path) => {
779
+ return executeRequest(buildUrl(getHelpCenterBaseUrl(subdomain), path), token, { method: "DELETE" });
780
+ };
778
781
  const fetchZendeskBinary = async (subdomain, token, contentUrl) => {
779
782
  const expectedHost = `${subdomain}.zendesk.com`;
780
783
  const headers = {};
@@ -1566,6 +1569,32 @@ const createHelpCenterTools = (ctx) => {
1566
1569
  }] };
1567
1570
  }
1568
1571
  },
1572
+ {
1573
+ name: "archive_article",
1574
+ namespace: "help_center",
1575
+ readOnly: false,
1576
+ title: "Archive Help Center Article",
1577
+ description: "Archive (soft-delete) a Help Center article: it is removed from the Help Center but can be restored from the Guide admin UI. Returns a confirmation message; the article and all its translations become invisible to end users. This is the only removal the Zendesk API offers — permanent deletion is not available via the API (do it from the Guide admin UI). To only hide an article temporarily while keeping it in the knowledge base, use update_article with draft: true (unpublish) instead. Guarded by a required confirm flag.",
1578
+ inputSchema: z.object({
1579
+ article_id: z.number().int().describe(ARTICLE_ID_DESC),
1580
+ confirm: z.boolean().describe("Explicit safety guard: must be set to true to archive the article. Any other value refuses the operation without calling Zendesk.")
1581
+ }),
1582
+ annotations: {
1583
+ readOnlyHint: false,
1584
+ destructiveHint: true,
1585
+ idempotentHint: true,
1586
+ openWorldHint: true
1587
+ },
1588
+ handler: async (params) => {
1589
+ const { article_id, confirm } = params;
1590
+ if (confirm !== true) throw new Error("Archiving is guarded: pass confirm: true to archive (soft-delete) this article. No changes were made.");
1591
+ await helpCenterDelete(subdomain, await getToken(), `/articles/${article_id}`);
1592
+ return { content: [{
1593
+ type: "text",
1594
+ text: `Article #${article_id} archived (soft-deleted). It is removed from the Help Center; restore it from the Guide admin UI if needed.`
1595
+ }] };
1596
+ }
1597
+ },
1569
1598
  {
1570
1599
  name: "list_content_tags",
1571
1600
  namespace: "help_center",