API & MCP
Everything a person can do on Garden Bed Planner, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://hearthgardenbeds.usefulweb.site/api/v1/calculate– run Garden Bed PlannerGET https://hearthgardenbeds.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Garden Bed Planner
Plan vegetable beds in 30 cm squares or in rows for an early, main and late season. You get plants per crop from spacing data, checks for overlaps, crop rotation and sun hours behind obstacles, traditional companion pairs and the seeds, sets or plants to buy.
| Field | Type | Default | Description |
|---|---|---|---|
place | text | — | Place for sun hours (latitude, longitude, optional). Empty = no sun hours. |
year | integer | 2027 | Season (year of the spring frost) |
beds | table | [{"name":"Bed 1","width":120,"length":240,"method":"square","lastYear":"potatoes | Beds |
plantings | table | [{"bed":"Bed 1","crop":"carrot","season":"early","count":4},{"bed":"Bed 1","crop | Plantings |
obstacles | table | — | Obstacles that shade a bed (optional) |
Example request
One raised bed over three seasons
curl -X POST https://hearthgardenbeds.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"place":"52.52, 13.40","year":2027,"beds":[{"name":"Bed 1","width":120,"length":240,"method":"square","lastYear":"potatoes","twoYearsAgo":"legumes"}],"plantings":[{"bed":"Bed 1","crop":"carrot","season":"early","count":4},{"bed":"Bed 1","crop":"lettuce","season":"early","count":4},{"bed":"Bed 1","crop":"tomato","season":"main","count":4},{"bed":"Bed 1","crop":"basil","season":"main","count":2},{"bed":"Bed 1","crop":"bush-bean","season":"main","count":6},{"bed":"Bed 1","crop":"spinach","season":"late","count":6}]}'
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://hearthgardenbeds.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
hearth_garden_beds - Local stdio connector:
node src/mcp-stdio.ts --tool=hearth-garden-beds
{
"mcpServers": {
"hearth-garden-beds": { "type": "http", "url": "https://hearthgardenbeds.usefulweb.site/mcp" }
}
}