API & MCP
Everything a person can do on Pocketlab Step Counter (accelerometer CSV), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://pocketlabstepcounter.usefulweb.app/api/v1/calculate– run Pocketlab Step Counter (accelerometer CSV)GET https://pocketlabstepcounter.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Pocketlab Step Counter (accelerometer CSV)
Counts the steps in a phone or wearable accelerometer recording, the same way the Pocketlab step counter does live: paste or upload a CSV with a time column and one to three acceleration columns. You get the number of steps, the walking cadence, an estimated distance from your step length, steps per minute and a chart with every detected step.
| Field | Type | Default | Description |
|---|---|---|---|
file | file | — | CSV file. One row per sample: time, then 1–3 acceleration columns; header optional. Up to 200 000 rows. |
csv | textarea | — | Or paste the samples. Used when no file is uploaded. Comma, semicolon, tab or space separated — the CSV the Pocketlab recorders download fits. |
timeUnit | select (auto, s, ms, us) | "auto" | Time unit |
accelUnit | select (ms2, g) | "ms2" | Acceleration unit |
stride | number | 0.7 | Step length. For the distance estimate. Measure it: walk 10 steps and divide the distance by 10. |
sensitivity | number | 5 | Sensitivity. 1 = only firm steps, 10 = also light steps (and more false counts). |
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://pocketlabstepcounter.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
pocketlab_step_counter - Local stdio connector:
node src/mcp-stdio.ts --tool=pocketlab-step-counter
{
"mcpServers": {
"pocketlab-step-counter": { "type": "http", "url": "https://pocketlabstepcounter.usefulweb.app/mcp" }
}
}