Skip to content

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

AnnotationValue
readOnlyHinttrue
destructiveHintfalse
openWorldHinttrue

Parameters

NameTypeRequiredDescription
idstringYesThe deployment ID

Example

User prompt:

"How many people clicked the signup button on my landing page?"

What Claude does:

  1. Calls list_counters with the deployment ID.
  2. 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/increment from JavaScript: fetch('/_counter/my-counter/increment', { method: 'POST' }).
  • Counter values are public (readable by anyone who knows the URL). Submission data is private.

Deploy apps from conversation.