Read site analytics
siteAnalyticsRead one owned project’s own site traffic (not its Analytics page’s devices or a row’s detail), with the counter’s state (site): a count is only meaningful next to whether anything is counting it. The first read of a project that never had a key issues its public siteKey, exactly as opening the Analytics page does — so this read can create that key as a side effect. notes and site.notice are the answer’s own sentences, and traffic.available distinguishes unavailable traffic storage from measured traffic: false means this deployment has no traffic store, so nothing is counted and no key can be issued — notes says so in the page’s words rather than returning a zero that reads as “no visits”. With visitorsCounted: false every unique-visitor count is null: unmeasurable, not zero. Aggregates only: no visitor is identified, no row is returned, and this cannot change what a visitor’s page counts. Another account’s project answers not found.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>"
},
"name": "siteAnalytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| timeZone | No | ||
| projectId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| notes | Yes | ||
| window | Yes | ||
| hosting | No | ||
| traffic | Yes | ||
| projectId | Yes | ||
| retentionDays | Yes |