{"server":"gizmoanalytics-mcp","checked":"2026-12-04","tools":[{"name":"add_site_tags","description":"Attaches one or more free-form tags to a site, creating new tags as needed. Pair with filter_sites_by_tag to drill into a group.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"tags":{"type":"array","items":{"type":"string"},"description":"Array of tag names. New tags are created automatically."}},"required":["site_id","tags"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"breakdown_by_property","description":"Top values for a custom event property (instrumented via get_event_tracking_snippet), with visitor counts. For built-in dimensions use get_breakdown instead.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"property":{"type":"string","minLength":1,"maxLength":64,"description":"Custom event property name, [A-Za-z0-9_.-]{1,64} (e.g. 'plan')."},"event_name":{"description":"Narrow to a single event (e.g. 'signup'). Omit to roll up across every event that has the property.","type":"string"},"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"limit":{"description":"Default 20, max 200.","type":"integer","minimum":1,"maximum":200}},"required":["property"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"connect_payment_provider","description":"Step 1 of revenue-attribution setup: creates or fetches a site's payment integration and returns the webhook URL and events to enable. Idempotent. Follow with set_payment_webhook_secret to activate.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"provider":{"description":"Payment provider. Defaults to stripe.","type":"string","enum":["stripe","lemonsqueezy","polar"]}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"create_funnel","description":"Creates an ordered multi-step funnel for a site. A session reaches step N if it matched steps 0..N in the same session (30-min idle gap).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"name":{"type":"string","description":"Human-readable name for the funnel (e.g. 'Pricing to signup')."},"steps":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Display name for this step."},"type":{"type":"string","enum":["path","event"],"description":"'path' matches a URL path prefix; 'event' matches a named custom event."},"target":{"type":"string","description":"URL path prefix (when type='path') or event name (when type='event')."}},"required":["name","type","target"],"additionalProperties":false},"description":"Ordered steps. A session 'reaches' step N if it matched all of steps 0..N within the same session (30-min idle gap). Min 2, max 10."}},"required":["site_id","name","steps"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"create_goal","description":"Creates a conversion goal for a site (path-prefix or named custom event). Shows on the site dashboard with conversion count + rate.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"name":{"type":"string","description":"Human-readable name for the goal (e.g. 'Signup', 'Purchase')."},"type":{"type":"string","enum":["path","event"],"description":"'path' matches sessions that visit a URL path prefix; 'event' matches sessions that fire a named custom event."},"target":{"type":"string","description":"When type='path', the URL path prefix (e.g. '/thank-you'). When type='event', the event name (e.g. 'signup')."}},"required":["site_id","name","type","target"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"create_site","description":"Registers a domain and returns the install snippet, a privacy_policy reminder, and an optional badge. For a full install workflow prefer setup_analytics_for_site; use this when only the site row is needed. Edit the target file to insert the snippet; don't just print it.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"string","description":"Domain to track, apex preferred (e.g. 'acme.com')."},"framework":{"description":"Detect from config files: next.config.*→next, nuxt.config.*→nuxt, svelte.config.*→sveltekit, astro.config.*→astro, remix→remix, vite.config.*→vite, else react or html.","type":"string","enum":["next","react","vite","remix","astro","nuxt","sveltekit","html"]}},"required":["domain"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"delete_funnel","description":"Removes a funnel by id. Destructive — confirm first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"funnel_id":{"type":"string","description":"Internal funnel UUID. Get one from list_funnels."}},"required":["funnel_id"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"delete_goal","description":"Removes a conversion goal and its historical data. Destructive — confirm first.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"goal_id":{"type":"string","description":"Internal goal UUID. Get one from list_goals."}},"required":["goal_id"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"detect_anomalies","description":"Flags days with unusual traffic per site via z-score over the range. Sites under 20 total visitors are skipped as low-signal. Omit site_id to scan the whole fleet.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"date_range":{"description":"Defaults to last_14_days for stable mean/stddev.","type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days"]},"threshold":{"description":"Z-score absolute value above which to flag a day as anomalous. Defaults to 2.5 (~1-in-100). Lower = more sensitive.","type":"number","minimum":1.5,"maximum":5}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"explain_traffic_change","description":"Explains why traffic on a site changed: overview deltas, top page and referrer gainers/losers vs prior period, anomaly-day callouts, and the daily series to pinpoint the break.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"date_range":{"description":"Defaults to last_7_days.","type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days"]}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"filter_sites_by_tag","description":"List sites carrying a tag. Identical to list_sites({tag}).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tag":{"type":"string","description":"Tag name (free-form string, lowercase recommended)."}},"required":["tag"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_badge_snippet","description":"Returns the \"Powered by Gizmo\" footer badge as a single anchor tag. Place inline in the existing footer next to the copyright line; don't wrap or restyle it.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_breakdown","description":"Top-N rows for one built-in dimension (page, referrer, country, region, city, browser, device, language, screen, channel, ai_source, hostname). For custom event properties use breakdown_by_property instead.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"dimension":{"type":"string","enum":["page","referrer","country","region","city","browser","device","language","screen","channel","ai_source","hostname"],"description":"Dimension to group by."},"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined filters.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}},"limit":{"description":"Default 20, max 200.","type":"integer","minimum":1,"maximum":200}},"required":["dimension"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_conversion_report","description":"Audit conversion measurement for a site: goal rates with visitor denominators, funnel completion rates, transitions ranked by lost sessions, and warnings for missing tracking, path-based proxies and small samples. Supports custom dates and stacked activity filters (not entry/exit session filters). Does not infer causes from drop-off counts.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Site UUID from list_sites."},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_event_tracking_snippet","description":"Returns the JS snippet for firing a custom event (e.g. window.gizmo(\"signup\", {plan:\"pro\"})). Requires the tracker already installed. Edit the target file to insert the snippet at the right code path; don't just print it.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"event_name":{"type":"string","description":"Custom event name, 1–64 chars alphanumeric + dot/dash/underscore."},"properties":{"description":"Key-value props (string/number/boolean), keys [A-Za-z0-9_]{1,64}. Enables breakdown_by_property later.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["event_name"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_install_snippet","description":"Re-fetches the framework-specific install snippet for an existing site — for a switched framework or a snippet never installed. Edit the target file to insert the snippet; don't just print it.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"framework":{"description":"Detect from config files: next.config.*→next, nuxt.config.*→nuxt, svelte.config.*→sveltekit, astro.config.*→astro, remix→remix, vite.config.*→vite, else react or html.","type":"string","enum":["next","react","vite","remix","astro","nuxt","sveltekit","html"]}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_realtime","description":"Live activity over the last 5 minutes: active visitors, pageviews, custom events, latest observed pages and recent actions. Excludes bots. Presence includes reading heartbeats; the feed excludes them. Entry/exit page session filters are unsupported.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"filters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_revenue","description":"Revenue attributed to traffic from the site's payment provider: totals (revenue, payments, customers, recurring share) plus a first-touch breakdown by one dimension. Amounts are integer cents; empty breakdown key = unattributed.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"dimension":{"description":"Breakdown dimension. Defaults to channel.","type":"string","enum":["channel","utm_campaign","utm_source","entry_path","country","referrer"]},"limit":{"description":"Default 20, max 200.","type":"integer","minimum":1,"maximum":200}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_scroll_depth","description":"Page-level scroll engagement for one site: average furthest visible percentage and measured-pageview count. Snapshots of each pageview count once. Supports organic channel and page filters. No recordings or text capture; missing historical measurements are null.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Site UUID from list_sites."},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined audience filters, e.g. channel is organic.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}},"limit":{"description":"Default 20, max 200.","type":"integer","minimum":1,"maximum":200}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_site_traffic","description":"Traffic metrics for a single site: overview, top pages, top referrers.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined filters.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_time_series","description":"Time-bucketed visitors/pageviews/events, one row per bucket. Bucket auto-resolves to hour for windows ≤48h, day otherwise.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined filters.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}},"bucket":{"description":"Bucket granularity. Auto-resolves to hour for windows ≤48h, day otherwise. Override to force a specific bucket.","type":"string","enum":["hour","day"]}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_top_pages","description":"Top page paths by event count, optionally scoped to one site.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined filters.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}},"limit":{"description":"Default 20, max 200.","type":"integer","minimum":1,"maximum":200}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_top_referrers","description":"Top referrer hostnames by event count, optionally scoped to one site.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined filters.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}},"limit":{"description":"Default 20, max 200.","type":"integer","minimum":1,"maximum":200}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"get_workspace_overview","description":"Aggregate metrics across all sites in the workspace: visitors, pageviews, sessions, bounce rate, top sites.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined filters.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"identify_dead_sites","description":"Finds abandoned sites: 'never_installed' (tracker likely never added) or 'went_silent' (had traffic, quiet for N+ days). Sorted never_installed first, then longest-silent.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"quiet_days":{"description":"How many days of silence count as 'dead'. Defaults to 7. Anything fresher than this is treated as alive.","type":"integer","minimum":1,"maximum":365}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"list_event_renames","description":"Lists every configured event rename for a site.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"list_funnels","description":"Lists every funnel for a site with per-step reached counts and drop-off rate. Requires create_funnel first if none exist.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"date_range":{"anyOf":[{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]},{"anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]}]},"filters":{"type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"list_goals","description":"Lists every goal for a site with conversion count and rate over the date range. Requires create_goal first if none exist.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"date_range":{"anyOf":[{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]},{"anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]}]},"filters":{"type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"list_metrics","description":"List custom metrics pushed to this workspace (server health, queue depth, business numbers) with each series' tags and latest value. Start here, then call query_metrics for history.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"Only this metric name (e.g. 'disk.free_bytes'). Omit for all.","type":"string","maxLength":64}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"list_sites","description":"Lists every site in the workspace with id, domain, createdAt, and ignored status. Use the returned site.id for other site-scoped tools.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tag":{"description":"Filter to sites with this tag. Omit for all sites.","type":"string"}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"query_events","description":"Queries raw events. Defaults to the latest 100, max 1000 per call; paginate large analyses via date_range.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"description":"Site UUID from list_sites. Omit for whole workspace.","type":"string"},"event_name":{"description":"Custom event name, 1–64 chars alphanumeric + dot/dash/underscore.","type":"string"},"date_range":{"description":"Preset or custom {from,to} range. Default varies by tool, usually last_7_days.","anyOf":[{"type":"object","properties":{"preset":{"type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days","last_year","month_to_date","last_month","all_time"]}},"required":["preset"],"additionalProperties":false},{"type":"object","properties":{"from":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."},"to":{"type":"string","description":"Inclusive. ISO 8601 with offset, or YYYY-MM-DD interpreted in UTC."}},"required":["from","to"],"additionalProperties":false}]},"filters":{"description":"AND-joined filters.","type":"array","items":{"type":"object","properties":{"dim":{"type":"string","description":"One of: page, entry_page, exit_page, referrer, hostname, channel, ai_source, utm_source, utm_medium, utm_campaign, country, region, city, language, device, browser, screen, event_name, or 'prop:<name>' for a custom event property."},"op":{"type":"string","enum":["is","is_not","contains","not_contains"],"description":"Substring ops: contains/not_contains; exact: is/is_not."},"value":{"type":"string","description":"Case-sensitive. Country as code ('US'), language as ISO 639 ('en')."}},"required":["dim","op","value"],"additionalProperties":false}},"limit":{"description":"Default 100, max 1000.","type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"query_metrics","description":"History and latest value of one custom metric, one line per tag set. Use for questions like 'how much disk is left?' (read latest) or 'how did queue depth trend this week?' (read points). Points are bucketed averages with min/max/last.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"Metric name from list_metrics, e.g. 'disk.free_bytes'."},"tags":{"description":"Only series whose tags include all of these, e.g. {\"host\": \"db-ash-1\"}.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"date_range":{"description":"Default last_24_hours. Raw data is kept 30 days; older ranges use hourly rollups.","type":"string","enum":["last_hour","last_24_hours","last_7_days","last_30_days","last_90_days","last_12_months"]}},"required":["name"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"rank_sites_by_growth","description":"Ranks sites by signed % visitor change vs the prior period. Sites under 20 visitors in either period are excluded as noise (count in excluded_low_volume).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"date_range":{"description":"Defaults to last_7_days.","type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days"]},"direction":{"description":"Filter to growers ('up'), decliners ('down'), or biggest absolute movers either way ('both', default).","type":"string","enum":["up","down","both"]},"limit":{"description":"Max rows. Defaults to 10, capped at 50.","type":"integer","minimum":1,"maximum":50}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"rename_event","description":"Renames an event on a site: backfills every past event to the new name, updates any goal/funnel that targets the old name, and — going forward — rewrites the old name to the new one at ingest, so client bundles still sending the old name keep working. Single-hop only (can't chain renames).","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."},"from_event":{"type":"string","description":"The event name events are currently arriving as, 1–64 chars alphanumeric + dot/dash/underscore. Can't be 'pageview' or 'engagement'."},"to_event":{"type":"string","description":"The corrected event name to rename it to, 1–64 chars alphanumeric + dot/dash/underscore."}},"required":["site_id","from_event","to_event"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}},{"name":"set_payment_api_key","description":"Zero-code Stripe revenue setup: saves a read-only restricted API key for an integration from connect_payment_provider, imports the last 90 days of payments, then re-syncs daily.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"integration_id":{"type":"string","description":"Integration id from connect_payment_provider (provider must be stripe)."},"api_key":{"type":"string","description":"Restricted read-only key, rk_live_… or rk_test_…."}},"required":["integration_id","api_key"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"set_payment_webhook_secret","description":"Step 2 of revenue-attribution setup: saves the webhook signing secret for an integration from connect_payment_provider, activating revenue ingestion.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"integration_id":{"type":"string","description":"Integration id from connect_payment_provider."},"secret":{"type":"string","description":"The webhook signing secret (Stripe: whsec_…; Lemon Squeezy: the secret you chose; Polar: the endpoint secret)."}},"required":["integration_id","secret"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"setup_analytics_for_site","description":"One-call install workflow: creates the site and returns the install snippet, the exact file to paste it into (paste_target.file), and next steps. Preferred for any install/add-analytics request. Edit the paste-target file to insert the snippet; don't just print it.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"string","description":"Domain to track, apex preferred (e.g. 'acme.com')."},"framework":{"description":"Detect from config files: next.config.*→next, nuxt.config.*→nuxt, svelte.config.*→sveltekit, astro.config.*→astro, remix→remix, vite.config.*→vite, else react or html.","type":"string","enum":["next","react","vite","remix","astro","nuxt","sveltekit","html"]},"event_hint":{"description":"If the user mentioned a specific event to track (e.g. 'signup'), include an example_event snippet for it.","type":"string"}},"required":["domain"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"summarize_all_sites","description":"Workspace-wide status rollup: fleet totals with % change vs prior period, per-site status, prioritized needs-attention list, top movers, AI-traffic leaders. Best first call for broad 'how is everything doing' questions.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"date_range":{"description":"Defaults to last_7_days.","type":"string","enum":["today","yesterday","last_7_days","last_14_days","last_30_days","last_90_days"]}},"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"verify_install","description":"Fetches the site's homepage and checks for the tracker script. Returns installed:true, installed:false with a reason (usually not deployed yet), or an error when the fetch is blocked (bot protection) — an error doesn't necessarily mean tracking is broken. Report the result honestly.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site_id":{"type":"string","description":"Site UUID from list_sites."}},"required":["site_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}}],"resources":[],"prompts":[]}