API & MCP
Everything a person can do on Pocketlab Seismograph (accelerometer CSV → peaks and events), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://pocketlabseismograph.usefulweb.app/api/v1/calculate– run Pocketlab Seismograph (accelerometer CSV → peaks and events)GET https://pocketlabseismograph.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Pocketlab Seismograph (accelerometer CSV → peaks and events)
Turns an accelerometer recording from a phone lying on a table or floor into a seismogram: peak and RMS acceleration after removing gravity, the strongest axis and a list of events (footsteps, a slammed door, a passing truck) found by the classic STA/LTA trigger. Same engine as the Pocketlab seismograph.
| 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 |
trigger | number | 3 | Trigger ratio (STA/LTA). An event starts when the 0.5 s average of the shaking is this many times the 10 s average; it ends below 1.5. |
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://pocketlabseismograph.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
pocketlab_seismograph - Local stdio connector:
node src/mcp-stdio.ts --tool=pocketlab-seismograph
{
"mcpServers": {
"pocketlab-seismograph": { "type": "http", "url": "https://pocketlabseismograph.usefulweb.app/mcp" }
}
}