{"openapi":"3.1.0","info":{"title":"Trainplan API","version":"0.1.0","description":"Computed couch-to-5k / race-training-plan generator built from standard progression rules.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://trainplan.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/trainplan/docs"},"termsOfService":"https://connectorbay.com/trainplan/terms"},"servers":[{"url":"https://trainplan.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/trainplan/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/training_plan":{"post":{"operationId":"training_plan","summary":"Generate a real, computed week-by-week training plan: a schedule of rest/easy/tempo/long-run days with","description":"Generate a real, computed week-by-week training plan: a schedule of rest/easy/tempo/long-run days with\n    distances in km for every week, built from the 10% weekly-increase rule with periodic cutback weeks and a taper\n    into race day. Use for \"8-week beginner 5k plan, 3 days a week\", \"16-week intermediate half marathon plan\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"level":{"description":"beginner | intermediate","title":"Level","type":"string"},"race":{"description":"5k | 10k | half | marathon (also accepts 'half marathon', 'full marathon', '10km').","title":"Race","type":"string"},"weeks":{"description":"Weeks available until race day.","maximum":32,"minimum":4,"title":"Weeks","type":"integer"},"days_per_week":{"anyOf":[{"maximum":6,"minimum":3,"type":"integer"},{"type":"null"}],"default":null,"description":"Running days per week (3-6). Default: 3 for beginner, 5 for intermediate.","title":"Days Per Week"},"start_weekly_km":{"anyOf":[{"exclusiveMinimum":0,"maximum":150,"type":"number"},{"type":"null"}],"default":null,"description":"Override the computed starting weekly distance in km, if you already know your current volume.","title":"Start Weekly Km"}},"required":["level","race","weeks"],"title":"training_planArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/training_principles":{"post":{"operationId":"training_principles","summary":"Explains the standard, published progression rules this generator applies — the 10% weekly-volume rule,","description":"Explains the standard, published progression rules this generator applies — the 10% weekly-volume rule,\n    cutback weeks, tapering, long-run sizing and hard/easy day spacing — without generating a plan. Use for \"why do\n    training plans have cutback weeks\", \"how much should my long run be\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"training_principlesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}