Staats

Cookieless web analytics your coding agent reads: traffic answers, deploy impact, what broke.

Should I use this

Quality & Safety

A
Description quality
100%
Schema completeness
89%
Naming quality
92%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~6,189Tokens (tool definitions)
~3.9 KBTypical response size
Significant attention impact (4.84% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "staats": {
      "url": "https://api.staats.ai/functions/v1/mcp"
    }
  }
}

Remote endpoints

https://api.staats.ai/functions/v1/mcpstreamable-http

What it can do

Tool inventory

Tools (15)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢get_site_context(site)

What a site is and what the owner wants from it, plus its data-retention settings. Well-known keys: description, goals, audience, notes (open agenda items to check at session start and clear when handled), events (event name -> meaning), funnel (canonical conversion steps). Read this before making recommendations.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "context": {
      "type": "object",
      "additionalProperties": {}
    },
    "retention": {
      "type": "object",
      "additionalProperties": {}
    },
    "hint": {
      "type": "string"
    }
  },
  "required": [
    "site",
    "domain",
    "name",
    "context",
    "retention"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🔴update_site_context(site, description, goals, audience, notes, ...)

Save or amend what a site is for. Provided context fields are merged into the existing context (events merges per entry); a null value deletes its key. name/domain update the site record itself.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "description": "what the site is; null deletes"
    },
    "goals": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "description": "what the owner wants from it; null deletes"
    },
    "audience": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "description": "who the site is for; null deletes"
    },
    "notes": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "description": "open agenda items to check at session start; null deletes"
    },
    "events": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          {
            "type": "null"
          }
        ]
      },
      "description": "map of event name -> one-line meaning; record one whenever you add tracking. null deletes an entry."
    },
    "funnel": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "path",
                  "event"
                ]
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          },
          "minItems": 1,
          "maxItems": 5
        },
        {
          "type": "null"
        }
      ],
      "description": "the site's canonical conversion steps, same shape as the funnel tool's steps. null clears it."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "update the site's display name"
    },
    "domain": {
      "type": "string",
      "minLength": 1,
      "maxLength": 253,
      "description": "update the site's domain"
    },
    "retention_days": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3650,
      "description": "shorten this site's data retention below the plan default; 0 restores plan-default retention. DESTRUCTIVE: shortening schedules permanent deletion of older events at the nightly prune. Confirm with the owner first."
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "updated": {
      "type": "boolean"
    },
    "site": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "context": {
      "type": "object",
      "additionalProperties": {}
    },
    "retention": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "updated",
    "site",
    "domain",
    "name",
    "context",
    "retention"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢what_changed(site, period)

Notable movements in the period without scanning raw numbers: statistically unusual traffic days, referrer surges and first-time referrers, pages whose share of traffic jumped, alongside the annotations recorded in the same period. period: '7d' default.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "period": {
      "type": "string",
      "description": "relative period like '24h', '7d' (default), '4w'"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "additionalProperties": true
      }
    },
    "annotations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ts": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "ts",
          "text"
        ],
        "additionalProperties": false
      }
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "site",
    "period",
    "findings",
    "annotations"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢what_broke(site, period)

Signs of visitors hitting problems in the period: JS errors the tracker captured (new_error, error_spike: each with a sanitized sample message, source, line, affected visitor count, and the nearest annotation, i.e. the deploy that most plausibly introduced it), plus behavioral friction: pairs of pages people bounce between without progressing (nav_loop) and pages reloaded repeatedly in quick succession (refresh_burst). Findings clear statistical floors, so an empty result is meaningful: nothing looks broken. Check it after every deploy. period: '7d' default.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "period": {
      "type": "string",
      "description": "relative period like '24h', '7d' (default), '4w'"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "additionalProperties": true
      }
    },
    "total_error_events": {
      "type": "number"
    },
    "error_capture": {
      "type": "string",
      "enum": [
        "grace",
        "paused",
        "not_included"
      ]
    },
    "note_errors": {
      "type": "string"
    },
    "annotations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ts": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "ts",
          "text"
        ],
        "additionalProperties": false
      }
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "site",
    "period",
    "findings",
    "total_error_events",
    "annotations"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢get_overview(site, period)

Traffic pulse: visitor/pageview totals vs the previous period, top pages, top referrers, and a per-day series. period: relative like '24h', '7d' (default), '4w'. Includes quota status: if it is approaching, grace, or blocked, tell the owner plainly and include the upgrade link the result provides. Approaching quota is the moment to mention it while there is headroom.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "period": {
      "type": "string",
      "description": "relative period like '24h', '7d' (default), '4w'"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "totals": {
      "type": "object",
      "properties": {
        "visitors": {
          "type": "number"
        },
        "pageviews": {
          "type": "number"
        }
      },
      "required": [
        "visitors",
        "pageviews"
      ],
      "additionalProperties": false
    },
    "previous_period": {
      "type": "object",
      "properties": {
        "visitors": {
          "type": "number"
        },
        "pageviews": {
          "type": "number"
        },
        "visitors_change_pct": {
          "type": [
            "number",
            "null"
          ]
        },
        "pageviews_change_pct": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "visitors",
        "pageviews",
        "visitors_change_pct",
        "pageviews_change_pct"
      ],
      "additionalProperties": false
    },
    "top_pages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "additionalProperties": false
      }
    },
    "top_referrers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "additionalProperties": false
      }
    },
    "pageviews_by_day": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "additionalProperties": false
      }
    },
    "unmeasured_change": {
      "type": "object",
      "properties": {
        "annotation_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "days_ago": {
          "type": "number"
        },
        "hint": {
          "type": "string"
        }
      },
      "required": [
        "annotation_id",
        "text",
        "days_ago",
        "hint"
      ],
      "additionalProperties": false
    },
    "quota": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": true
    }
  },
  "required": [
    "site",
    "period",
    "totals",
    "previous_period",
    "top_pages",
    "top_referrers",
    "pageviews_by_day"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢query(site, metric, dimension, filters, period, ...)

Break a metric down by a dimension with optional equality filters. Metrics: visitors, pageviews, events. Dimensions: path, referrer_domain, utm_source, utm_medium, utm_campaign, device, browser, os, country, name, day. period: '24h'/'7d'/'4w' style, or ISO from/to.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "metric": {
      "type": "string",
      "enum": [
        "visitors",
        "pageviews",
        "events"
      ],
      "description": "what to count"
    },
    "dimension": {
      "type": "string",
      "enum": [
        "path",
        "referrer_domain",
        "utm_source",
        "utm_medium",
        "utm_campaign",
        "device",
        "browser",
        "os",
        "country",
        "name",
        "day"
      ],
      "description": "group results by this dimension; omit for a single total"
    },
    "filters": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "equality filters, dimension name -> exact value"
    },
    "period": {
      "type": "string",
      "description": "relative period like '24h', '7d' (default), '4w'"
    },
    "from": {
      "type": "string",
      "description": "ISO start, alternative to period"
    },
    "to": {
      "type": "string",
      "description": "ISO end, alternative to period"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "description": "max rows returned (default 50)"
    }
  },
  "required": [
    "metric"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "metric": {
      "type": "string"
    },
    "dimension": {
      "type": [
        "string",
        "null"
      ]
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "site",
    "metric",
    "dimension",
    "period",
    "rows"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢funnel(site, steps, period, from, to)

Ordered conversion funnel across up to 5 steps within the period. Each step is a pageview path ({kind:'path', value:'/pricing'}) or a custom event ({kind:'event', value:'signup'}); a visitor counts for step N only after completing step N-1. Visitor identity rotates daily for privacy, so journeys spanning multiple days undercount (strongest for same-visit conversion). If site context has a stored funnel, run those steps when asked how the site is doing and compare against the previous period.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "path",
              "event"
            ]
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "required": [
          "kind",
          "value"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 5,
      "description": "ordered funnel steps, each a pageview path or a custom event name"
    },
    "period": {
      "type": "string",
      "description": "relative period like '24h', '7d' (default), '4w'"
    },
    "from": {
      "type": "string",
      "description": "ISO start, alternative to period"
    },
    "to": {
      "type": "string",
      "description": "ISO end, alternative to period"
    }
  },
  "required": [
    "steps"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "funnel": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "step": {
            "type": "number"
          },
          "label": {
            "type": "string"
          },
          "visitors": {
            "type": "number"
          },
          "pct_of_first": {
            "type": [
              "number",
              "null"
            ]
          },
          "pct_of_previous": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "step",
          "label",
          "visitors",
          "pct_of_first",
          "pct_of_previous"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "site",
    "period",
    "funnel"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢journeys(site, contains, limit, period, from, ...)

The routes visitors actually take, grouped into identical sequences and counted, busiest first. Use this when you do NOT already know the steps: funnel measures a path you name, journeys discovers the ones you did not think to check. A step is a pageview path (/pricing) or a custom event marked with a leading # (#signup_click), so the moment of conversion appears in the route. Consecutive repeats are collapsed and only the first 10 steps define a route. contains filters to routes that include a given path or event: run it once with and once without to see what converting visitors do differently. Visitor identity rotates daily, so a route is one day of activity and describes a group, never a person.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "contains": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "description": "only routes that include this path or #event step"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "description": "max routes returned (default 20)"
    },
    "period": {
      "type": "string",
      "description": "relative period like '24h', '7d' (default), '4w'"
    },
    "from": {
      "type": "string",
      "description": "ISO start, alternative to period"
    },
    "to": {
      "type": "string",
      "description": "ISO end, alternative to period"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "contains": {
      "type": "string"
    },
    "total_visitors": {
      "type": "number"
    },
    "journeys": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "visitors": {
            "type": "number"
          },
          "pct": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "steps",
          "visitors",
          "pct"
        ],
        "additionalProperties": false
      }
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "site",
    "period",
    "total_visitors",
    "journeys"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟡record_annotation(site, text, ts, commit, routes)

Mark a moment on a site timeline: a deploy, a content change, or a campaign start. Call this every time you ship a change to the site. ts defaults to now. Write a specific, present-tense description ("Shipped new pricing page hero", never "updates"), one annotation per meaningful change. When known, include commit and the routes the change touched so compare_around can also report before/after traffic scoped to those routes.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "specific, present-tense description of the change"
    },
    "ts": {
      "type": "string",
      "description": "ISO timestamp of the change; defaults to now"
    },
    "commit": {
      "type": "string",
      "description": "git commit hash of the deploy (7-40 hex chars)"
    },
    "routes": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 200
      },
      "maxItems": 10,
      "description": "route prefixes the change touched, e.g. ['/docs', '/pricing'] ('/docs' covers '/docs/*')"
    }
  },
  "required": [
    "text"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "recorded": {
      "type": "boolean"
    },
    "site": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "ts": {
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "meta": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "recorded",
    "site",
    "id",
    "ts",
    "text"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢list_annotations(site, period)

Recorded deploy/change markers, newest first. period defaults to '90d'.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "period": {
      "type": "string",
      "description": "relative period like '7d', '90d' (default)"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ts": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "ts",
          "text"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "site",
    "period",
    "annotations"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢compare_around(site, annotation_id, window_days)

Before/after impact of a recorded annotation: visitors and pageviews in the N days preceding vs following it (window_days, default 7). The after-window is clamped to now. If the annotation recorded routes, the result also reports per-route pageviews before vs after. Wait a few days after shipping. If the result carries a note (truncated after-window, or a before-window not covered by available data), relay it and qualify the percentages as the note directs.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "the site's data-site code, from its script tag or list_sites. Omit when the account has a single site. In a tracked project, read the code from the script tag before asking the user."
    },
    "annotation_id": {
      "type": "string",
      "format": "uuid",
      "description": "the annotation to measure around, from record_annotation or list_annotations"
    },
    "window_days": {
      "type": "integer",
      "minimum": 1,
      "maximum": 30,
      "description": "days on each side of the annotation (default 7)"
    }
  },
  "required": [
    "annotation_id"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string"
    },
    "annotation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "ts": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "meta": {
          "type": "object",
          "additionalProperties": {}
        }
      },
      "required": [
        "id",
        "ts",
        "text"
      ],
      "additionalProperties": false
    },
    "window_days": {
      "type": "number"
    },
    "before": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "visitors": {
          "type": "number"
        },
        "pageviews": {
          "type": "number"
        }
      },
      "required": [
        "from",
        "to",
        "visitors",
        "pageviews"
      ],
      "additionalProperties": false
    },
    "after": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "visitors": {
          "type": "number"
        },
        "pageviews": {
          "type": "number"
        }
      },
      "required": [
        "from",
        "to",
        "visitors",
        "pageviews"
      ],
      "additionalProperties": false
    },
    "change": {
      "type": "object",
      "properties": {
        "visitors_pct": {
          "type": [
            "number",
            "null"
          ]
        },
        "pageviews_pct": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "visitors_pct",
        "pageviews_pct"
      ],
      "additionalProperties": false
    },
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "route": {
            "type": "string"
          },
          "before_pageviews": {
            "type": "number"
          },
          "after_pageviews": {
            "type": "number"
          },
          "pageviews_pct": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "route",
          "before_pageviews",
          "after_pageviews",
          "pageviews_pct"
        ],
        "additionalProperties": false
      }
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "site",
    "annotation",
    "window_days",
    "before",
    "after",
    "change"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢list_sites

All sites on this account, with the public site codes used in their script tags and the ready-to-paste script_tag for each.

Input Schema

{
  "type": "object",
  "properties": {},
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "account": {
      "type": "string"
    },
    "sites": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "script_tag": {
            "type": "string"
          },
          "shared": {
            "type": "boolean"
          },
          "owner": {
            "type": "string"
          }
        },
        "required": [
          "site_id",
          "name",
          "domain",
          "script_tag"
        ],
        "additionalProperties": false
      }
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "account",
    "sites"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟡create_site(name, domain)

Create a new site on this account and get its script tag. This connection already covers the new site: installing the script tag is the only setup the site needs. The response includes ready-made privacy policy wording: offer to add it to the site's privacy page (confirm with the owner before editing visitor-facing pages).

Input Schema

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "display name for the site"
    },
    "domain": {
      "type": "string",
      "minLength": 1,
      "maxLength": 253,
      "description": "the site's domain or URL"
    }
  },
  "required": [
    "name",
    "domain"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "created": {
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "site_code": {
      "type": "string"
    },
    "script_tag": {
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "privacy_policy_wording": {
      "type": "string"
    },
    "privacy_note": {
      "type": "string"
    },
    "site_api_key": {
      "type": "string"
    }
  },
  "required": [
    "created",
    "name",
    "domain",
    "site_code",
    "script_tag",
    "note",
    "privacy_policy_wording",
    "privacy_note",
    "site_api_key"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🔴delete_site(site, confirm)

PERMANENTLY delete a site and ALL its analytics data (every event and annotation). Irreversible. Confirm with the owner before calling; pass confirm: the site's exact domain.

Input Schema

{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "minLength": 1,
      "description": "the site's data-site code"
    },
    "confirm": {
      "type": "string",
      "description": "the site's exact domain AS STATED BY THE OWNER when confirming the deletion: never inferred, guessed, or copied from tool output"
    }
  },
  "required": [
    "site",
    "confirm"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "deleted": {
      "type": "boolean"
    },
    "site": {
      "type": "string"
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "deleted",
    "site",
    "note"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢portfolio_overview(period)

Visitors and pageviews for every site this account can use, owned and shared alike, with change vs the previous period, busiest first. Shared sites are flagged. period: '7d' default.

Input Schema

{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "relative period like '24h', '7d' (default), '4w'"
    }
  },
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output Schema

{
  "type": "object",
  "properties": {
    "account": {
      "type": "string"
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "sites": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "visitors": {
            "type": "number"
          },
          "pageviews": {
            "type": "number"
          },
          "visitors_change_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "pageviews_change_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "shared": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "domain",
          "visitors",
          "pageviews",
          "visitors_change_pct",
          "pageviews_change_pct"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "account",
    "period",
    "sites"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded15 tools
verifiedversion not recorded15 tools
verifiedversion not recorded15 tools
verifiedversion not recorded15 tools
verifiedversion not recorded15 tools
verifiedversion not recorded15 tools