Callable spatial runtime
Spatial analysis, in a small API.
Discover a tool, send GeoJSON state, and receive the next state plus an execution receipt. The API is stateless: your response becomes the next request.
https://workbench.dannymcvey.comFirst request
Generate five points
Call RandomPointsTool with a bounding box. Save the returned state to use as input for your next operation.
const response = await fetch('/api/run', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
tool: 'RandomPointsTool',
params: { 'Points Count': 5, 'Inside Polygon': false },
state: { bbox: [-118.5, 33.5, -118.2, 33.8] }
})
});
const result = await response.json();
// result.state is ready for the next API call/api/run
Returns the live catalog of supported headless tools, their parameters, the API’s spatial assumptions, and an example request shape. This is the endpoint agents should call before choosing a tool.
curl https://workbench.dannymcvey.com/api/run/api/run
Executes one headless tool against the state you provide. Use the returned state as the authoritative handoff for a chained workflow.
Request body
toolstringThe key returned by discovery, such as BufferTool.
paramsobjectParameters for that tool. Names match the tool catalog exactly.
stateobjectSerialized spatial state. Use either layers or featureCollection.
curl -X POST https://workbench.dannymcvey.com/api/run \
-H 'Content-Type: application/json' \
-d '{
"tool": "RandomPointsTool",
"params": { "Points Count": 5, "Inside Polygon": false },
"state": { "bbox": [-118.5, 33.5, -118.2, 33.8] }
}'State model
State is explicit and request-scoped.
The server does not save a session. For layer tools, send state.layers; for attribute tools, send state.featureCollection. Each layer needs a stable id and GeoJSON.
state + paramstool executionreturned stateResponse contract
Know what happened, not just what returned.
Successful executions include status, output, the next state, spatial metadata, and an execution receipt.
200 · completed
Valid tool calls—including tool-level validation failures—return a consistent envelope. Check ok and status.
400 · malformed input
Invalid request shapes or invalid spatial state return structured validation details.
4xx · unsupported tool
Unknown or unsupported tool keys are rejected before execution.
Live catalog
Tools available now
Loading the current catalog…