API & MCP
Everything a person can do on Skyfold Sun Position and Shadow Length, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://skyfoldsunshadow.usefulweb.app/api/v1/calculate– run Skyfold Sun Position and Shadow LengthGET https://skyfoldsunshadow.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Skyfold Sun Position and Shadow Length
Computes the Sun’s azimuth and altitude, the length and compass direction of the shadow cast by an object of a given height on level ground, the shadow through the day, sunrise, solar noon, sunset and golden hour, plus a day-and-night map.
| Field | Type | Default | Description |
|---|---|---|---|
location | text | "48.1351, 11.582" | Location (latitude, longitude). Decimal degrees such as 52.09, 5.12 (north and east positive), or DMS, UTM, MGRS, Maidenhead or a plus code. |
elevation | number | 0 | Elevation above sea level |
timeZone | text | "Europe/Berlin" | Time zone. IANA name such as Europe/Berlin or America/New_York, or a fixed offset such as UTC+2. |
date | date | "2026-03-20" | Local date |
time | time | "16:00" | Local time |
height | number | 6 | Object height |
unit | select (m, ft) | "m" | Unit |
stepMinutes | select (15, 30, 60) | "60" | Table step |
Example request
A 6 m tree in Munich at the March equinox
curl -X POST https://skyfoldsunshadow.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"location":"48.1351, 11.582","elevation":520,"timeZone":"Europe/Berlin","date":"2026-03-20","time":"16:00","height":6,"unit":"m","stepMinutes":"60"}'
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://skyfoldsunshadow.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
skyfold_sun_shadow - Local stdio connector:
node src/mcp-stdio.ts --tool=skyfold-sun-shadow
{
"mcpServers": {
"skyfold-sun-shadow": { "type": "http", "url": "https://skyfoldsunshadow.usefulweb.app/mcp" }
}
}