create_website
Add a new website to Umami Analytics for tracking visitor data, statistics, and events by providing domain and display name.
Instructions
Create a new website to track in Umami
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Website domain (e.g. 'example.com') | |
| name | Yes | Display name for the website | |
| shareId | No | Unique share ID for public access |
Implementation Reference
- src/tools/websites.ts:38-52 (handler)The "create_website" tool is defined and registered here. It accepts domain, name, and optional shareId as inputs, and performs a POST request to the Umami API to create a new website.
server.tool( "create_website", "Create a new website to track in Umami", { domain: z.string().describe("Website domain (e.g. 'example.com')"), name: z.string().describe("Display name for the website"), shareId: z.string().optional().describe("Unique share ID for public access"), }, async ({ domain, name, shareId }) => { const body: Record<string, unknown> = { domain, name }; if (shareId) body.shareId = shareId; const data = await client.call("POST", "/api/websites", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );