Create Site
rybbit_create_siteCreate websites or mobile apps in Rybbit Analytics by specifying domain or package name, organization ID, and site type for tracking integration.
Instructions
Create a new site in Rybbit. Use type 'web' for websites (domain like 'example.com') or type 'app' for mobile apps (package name like 'com.example.app'). Returns the created site with its siteId for tracking integration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain of the site (e.g. 'example.com') or package name for apps (e.g. 'com.example.app') | |
| name | No | Display name for the site (defaults to domain) | |
| organizationId | Yes | Organization ID to add the site to. Use rybbit_list_sites to find organization IDs. | |
| type | No | Site type: 'web' for websites (default), 'app' for mobile apps |
Implementation Reference
- src/tools/config.ts:114-190 (handler)Registration and implementation of the "rybbit_create_site" tool, which creates a new site within a specific organization.
server.registerTool( "rybbit_create_site", { title: "Create Site", description: "Create a new site in Rybbit. Use type 'web' for websites (domain like 'example.com') or type 'app' for mobile apps (package name like 'com.example.app'). Returns the created site with its siteId for tracking integration.", inputSchema: { domain: z .string() .describe("Domain of the site (e.g. 'example.com') or package name for apps (e.g. 'com.example.app')"), name: z .string() .optional() .describe("Display name for the site (defaults to domain)"), organizationId: z .string() .describe( "Organization ID to add the site to. Use rybbit_list_sites to find organization IDs." ), type: z .enum(["web", "app"]) .optional() .describe("Site type: 'web' for websites (default), 'app' for mobile apps"), }, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true, }, }, async ({ domain, name, organizationId, type }) => { try { const isApp = type === "app"; const data = await client.post<Site>( `/organizations/${organizationId}/sites`, { domain, name: name || domain, ...(type ? { type } : {}), // App sites must have blockBots disabled - Dart/Flutter HTTP UA is detected as bot ...(isApp ? { blockBots: false } : {}), } ); // For app sites, ensure blockBots is disabled via config update if (isApp && data.id) { try { await client.put(`/sites/${data.id}/config`, { blockBots: false }); } catch { // Best-effort, create already set it } } return { content: [ { type: "text" as const, text: truncateResponse({ message: `Site '${data.domain}' created successfully${isApp ? " (blockBots disabled for app site)" : ""}`, siteId: data.id, domain: data.domain, name: data.name, organizationId: data.organizationId, }), }, ], }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } );