list_counters
List all named counters and their current values for a deployment. Counters are incremented by visitors via the /_counter/:name/increment endpoint on the deployed site.
Annotations
| Annotation | Value |
|---|---|
readOnlyHint | true |
destructiveHint | false |
openWorldHint | true |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The deployment ID |
Example
User prompt:
"How many people clicked the signup button on my landing page?"
What Claude does:
- Calls
list_counterswith the deployment ID. - Returns all counter names and values.
Response:
json
{
"counters": [
{ "name": "signup-clicks", "value": 142 },
{ "name": "demo-requests", "value": 38 }
]
}Notes
- Counters are created automatically the first time they are incremented on a deployed page.
- A deployment can have up to 10 named counters.
- Counter values update within 10 seconds of an increment (KV eventual consistency).
- To add a counter to your site, call
/_counter/my-counter/incrementfrom JavaScript:fetch('/_counter/my-counter/increment', { method: 'POST' }). - Counter values are public (readable by anyone who knows the URL). Submission data is private.