delete_organization
Remove an organization from Zendesk by specifying its ID using this tool on the Zendesk API MCP Server, streamlining organization management tasks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Organization ID to delete |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "Organization ID to delete",
"type": "number"
}
},
"required": [
"id"
],
"type": "object"
}
Implementation Reference
- src/tools/organizations.js:130-145 (handler)The handler function for the 'delete_organization' tool. It takes an organization ID, calls zendeskClient.deleteOrganization(id), and returns a success or error message.handler: async ({ id }) => { try { await zendeskClient.deleteOrganization(id); return { content: [{ type: "text", text: `Organization ${id} deleted successfully!` }] }; } catch (error) { return { content: [{ type: "text", text: `Error deleting organization: ${error.message}` }], isError: true }; } }
- src/tools/organizations.js:127-129 (schema)Zod input schema for the tool, requiring an 'id' parameter of type number.schema: { id: z.number().describe("Organization ID to delete") },
- src/server.js:48-52 (registration)Registration loop where all tools, including 'delete_organization' from organizationsTools, are registered with the MCP server using server.tool().allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:140-142 (helper)The underlying ZendeskClient method called by the tool handler to perform the DELETE request to /organizations/{id}.json endpoint.async deleteOrganization(id) { return this.request("DELETE", `/organizations/${id}.json`); }
- src/server.js:34-34 (registration)The organizationsTools array (containing delete_organization) is spread into the allTools array for registration....organizationsTools,