{
  "openapi": "3.1.1",
  "info": {
    "title": "Garden Sowing Calendar (122 Plants) API",
    "version": "1.0.0",
    "summary": "Sowing, planting, harvest and pruning dates for 122 garden plants from your frost dates.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://greenplotsowingcalendar.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Sowing, planting, harvest and pruning dates for 122 garden plants from your frost dates.",
        "description": "Turns your last spring and first autumn frost into a garden calendar for up to 60 of 122 vegetables, herbs, fruit and flowers: sow indoors, plant out, sow outside with repeat sowings, autumn planting, the harvest or flowering window, and the yearly pruning of fruit and perennials, with a calendar file.\n\nMethodology:\n- Annual vegetables, herbs and flowers go through Hearth’s sowing calendar unchanged (Greenplot passes its bigger plant table): weeks to sow indoors, to plant out and to sow outside are counted from your last spring frost; bulbs and garlic are planted around the first autumn frost; repeat sowings every 2–4 weeks stop when a sowing would no longer ripen before frost.\n- Perennials — fruit trees and bushes, perennial herbs and flowers, asparagus, rhubarb, horseradish — get their yearly windows in weeks from the last spring frost: planting (bare-root or pot), the harvest or flowering window, and pruning or cutting back with its kind (winter pruning of apples and pears, summer pruning of plums and cherries to avoid silver leaf, raspberry canes after fruiting …).\n- Each plant was compiled from its RHS “Grow your own” or growing-guide page (linked in the plant library); weeks are rules of thumb for temperate gardens and shift with your frost dates.\n- Calendar file: one all-day event per window start and per sowing, named after the task.\n\nTimings are rules of thumb. Soil temperature, variety and the weather of the year matter more than any calendar; perennials crop only after their first years.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "greenplot_sowing_calendar",
        "x-owner-app": "greenplot",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GreenplotSowingCalendarInput"
              },
              "examples": {
                "example1": {
                  "summary": "Berlin: vegetables, fruit and flowers",
                  "value": {
                    "plants": [
                      "tomato",
                      "lettuce",
                      "strawberry",
                      "apple",
                      "sweet-pea",
                      "garlic"
                    ],
                    "lastFrost": "04-08",
                    "firstFrost": "11-02",
                    "year": 2027
                  }
                },
                "example2": {
                  "summary": "Short season: Munich, cautious dates",
                  "value": {
                    "plants": [
                      "potato",
                      "kale",
                      "raspberry",
                      "blackcurrant",
                      "cosmos",
                      "tulip"
                    ],
                    "lastFrost": "05-06",
                    "firstFrost": "10-06",
                    "year": 2027
                  }
                },
                "example3": {
                  "summary": "Herb garden",
                  "value": {
                    "plants": [
                      "basil",
                      "parsley",
                      "rosemary",
                      "thyme",
                      "mint",
                      "chervil"
                    ],
                    "lastFrost": "04-15",
                    "firstFrost": "10-25",
                    "year": 2027
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GreenplotSowingCalendarResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "GreenplotSowingCalendarInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "plants": {
            "title": "Plants",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "tomato",
                "pepper",
                "eggplant",
                "potato",
                "cucumber",
                "zucchini",
                "squash",
                "melon",
                "sweetcorn",
                "bush-bean",
                "pole-bean",
                "pea",
                "broad-bean",
                "lettuce",
                "spinach",
                "chard",
                "beet",
                "carrot",
                "parsnip",
                "radish",
                "turnip",
                "onion",
                "spring-onion",
                "garlic",
                "leek",
                "cabbage",
                "broccoli",
                "cauliflower",
                "kale",
                "brussels-sprouts",
                "kohlrabi",
                "pak-choi",
                "rocket",
                "celery",
                "fennel",
                "parsley",
                "basil",
                "dill",
                "coriander",
                "chives",
                "asparagus",
                "rhubarb",
                "artichoke",
                "jerusalem-artichoke",
                "sweet-potato",
                "okra",
                "celeriac",
                "swede",
                "endive",
                "chicory",
                "mizuna",
                "corn-salad",
                "shallot",
                "chilli",
                "mangetout",
                "chinese-cabbage",
                "horseradish",
                "cress",
                "mustard-greens",
                "soybean",
                "tomatillo",
                "watermelon",
                "rosemary",
                "thyme",
                "sage",
                "oregano",
                "mint",
                "lavender",
                "tarragon",
                "lemon-balm",
                "lovage",
                "sorrel",
                "bay",
                "marjoram",
                "chamomile",
                "borage",
                "chervil",
                "summer-savory",
                "strawberry",
                "raspberry",
                "autumn-raspberry",
                "blackberry",
                "blueberry",
                "gooseberry",
                "redcurrant",
                "blackcurrant",
                "apple",
                "pear",
                "plum",
                "cherry",
                "peach",
                "apricot",
                "quince",
                "fig",
                "grape",
                "kiwi",
                "physalis",
                "sunflower",
                "french-marigold",
                "calendula",
                "nasturtium",
                "sweet-pea",
                "cosmos",
                "zinnia",
                "cornflower",
                "poppy",
                "nigella",
                "phacelia",
                "crimson-clover",
                "dahlia",
                "tulip",
                "daffodil",
                "snapdragon",
                "alyssum",
                "larkspur",
                "gladiolus",
                "echinacea",
                "rudbeckia",
                "lupin",
                "hollyhock",
                "verbena",
                "sweet-william"
              ]
            },
            "default": [
              "tomato",
              "lettuce",
              "strawberry",
              "apple",
              "sweet-pea",
              "garlic"
            ]
          },
          "lastFrost": {
            "title": "Last spring frost (MM-DD)",
            "description": "Month and day, for example 04-20. Hearth’s Frost Dates Finder gives it for Germany and the United States.",
            "type": "string",
            "maxLength": 5,
            "default": "04-20"
          },
          "firstFrost": {
            "title": "First autumn frost (MM-DD)",
            "type": "string",
            "maxLength": 5,
            "default": "10-20"
          },
          "year": {
            "title": "Season (year of the spring frost)",
            "type": "integer",
            "minimum": 2000,
            "maximum": 2100,
            "default": 2027
          }
        },
        "required": [
          "lastFrost",
          "firstFrost"
        ]
      },
      "GreenplotSowingCalendarResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "year",
              "lastFrost",
              "firstFrost",
              "frostFreeDays",
              "crops",
              "events",
              "tooLong",
              "ics"
            ],
            "properties": {
              "year": {
                "type": "integer"
              },
              "lastFrost": {
                "type": "string"
              },
              "firstFrost": {
                "type": "string"
              },
              "frostFreeDays": {
                "type": "integer"
              },
              "crops": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "crop",
                    "name",
                    "category",
                    "frost",
                    "daysToHarvest",
                    "tasks",
                    "sowings",
                    "lastSowing",
                    "fits",
                    "perennial",
                    "firstYears",
                    "pruneKind"
                  ],
                  "properties": {
                    "crop": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "frost": {
                      "type": "string"
                    },
                    "daysToHarvest": {
                      "type": "integer"
                    },
                    "tasks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "task",
                          "from",
                          "to"
                        ],
                        "properties": {
                          "task": {
                            "enum": [
                              "indoor",
                              "out",
                              "direct",
                              "autumn",
                              "harvest",
                              "prune"
                            ]
                          },
                          "from": {
                            "type": "string"
                          },
                          "to": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "sowings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "lastSowing": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fits": {
                      "type": "boolean"
                    },
                    "perennial": {
                      "type": "boolean"
                    },
                    "firstYears": {
                      "type": "integer"
                    },
                    "pruneKind": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "date",
                    "crop",
                    "task",
                    "until"
                  ],
                  "properties": {
                    "date": {
                      "type": "string"
                    },
                    "crop": {
                      "type": "string"
                    },
                    "task": {
                      "type": "string"
                    },
                    "until": {
                      "type": "string"
                    }
                  }
                }
              },
              "tooLong": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "ics": {
                "type": "string"
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}