create_organization
Create a new organization in Zendesk with name, domain names, details, notes, and tags for customer support management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Organization name | |
| domain_names | No | Domain names for the organization | |
| details | No | Details about the organization | |
| notes | No | Notes about the organization | |
| tags | No | Tags for the organization |
Implementation Reference
- src/tools/organizations.js:63-86 (handler)The MCP tool handler for 'create_organization'. Prepares organization data from inputs and delegates to zendeskClient.createOrganization, returning formatted success/error content.handler: async ({ name, domain_names, details, notes, tags }) => { try { const orgData = { name, domain_names, details, notes, tags }; const result = await zendeskClient.createOrganization(orgData); return { content: [{ type: "text", text: `Organization created successfully!\n\n${JSON.stringify(result, null, 2)}` }] }; } catch (error) { return { content: [{ type: "text", text: `Error creating organization: ${error.message}` }], isError: true }; } }
- src/tools/organizations.js:56-62 (schema)Zod schema defining the expected input parameters for the create_organization tool.schema: { name: z.string().describe("Organization name"), domain_names: z.array(z.string()).optional().describe("Domain names for the organization"), details: z.string().optional().describe("Details about the organization"), notes: z.string().optional().describe("Notes about the organization"), tags: z.array(z.string()).optional().describe("Tags for the organization") },
- src/server.js:48-52 (registration)Registration of all tools, including create_organization from organizationsTools, to the MCP server using server.tool().allTools.forEach((tool) => { server.tool(tool.name, tool.schema, tool.handler, { description: tool.description, }); });
- src/zendesk-client.js:129-131 (helper)ZendeskClient helper method invoked by the tool handler to perform the actual API POST request for creating an organization.async createOrganization(data) { return this.request("POST", "/organizations.json", { organization: data });