{"openapi":"3.1.0","info":{"title":"SwimPlan API","version":"0.1.0","description":"Structured swim-workout generation with real interval/rest-ratio math, a pace-per-100 calculator, a SWOLF efficiency calculator and stroke-technique reference — all local.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://swimplan.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/swimplan/docs"},"termsOfService":"https://connectorbay.com/swimplan/terms"},"servers":[{"url":"https://swimplan.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/swimplan/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/generate_workout":{"post":{"operationId":"generate_workout","summary":"A structured warmup/main-set/cooldown swim workout with a real main-set interval (pace + skill-based","description":"A structured warmup/main-set/cooldown swim workout with a real main-set interval (pace + skill-based\n    rest, rounded to the nearest 5 seconds). Use for \"give me a 2000m intermediate freestyle workout\" or\n    \"30-minute beginner breaststroke swim\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"skill_level":{"description":"beginner | intermediate | advanced","title":"Skill Level","type":"string"},"target_distance_m":{"anyOf":[{"maximum":10000,"minimum":200,"type":"number"},{"type":"null"}],"default":null,"description":"Total workout distance in meters. Give this or target_duration_min.","title":"Target Distance M"},"target_duration_min":{"anyOf":[{"maximum":240,"minimum":10,"type":"number"},{"type":"null"}],"default":null,"description":"Total workout duration in minutes, if you'd rather set time than distance.","title":"Target Duration Min"},"stroke_focus":{"default":"freestyle","description":"freestyle | backstroke | breaststroke | butterfly | mixed","title":"Stroke Focus","type":"string"},"custom_pace_per_100":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Your own pace per 100m, e.g. '1:38', instead of the skill-level default.","title":"Custom Pace Per 100"}},"required":["skill_level"],"title":"generate_workoutArguments","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/pace_calculator":{"post":{"operationId":"pace_calculator","summary":"Pace per 100m and per 50m, and speed, from a distance and time. Use for \"what pace is 400m in 6:00\".","description":"Pace per 100m and per 50m, and speed, from a distance and time. Use for \"what pace is 400m in 6:00\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"distance_m":{"description":"Distance swum, in meters.","exclusiveMinimum":0,"maximum":100000,"title":"Distance M","type":"number"},"time":{"description":"Time taken, 'mm:ss' or seconds.","examples":["6:00","95","1:02:30"],"title":"Time","type":"string"}},"required":["distance_m","time"],"title":"pace_calculatorArguments","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/swolf_score":{"post":{"operationId":"swolf_score","summary":"SWOLF efficiency score (time + strokes for one length; lower is more efficient), with an informal tier","description":"SWOLF efficiency score (time + strokes for one length; lower is more efficient), with an informal tier\n    for 25m/50m pools. Use for \"SWOLF for 35 seconds and 15 strokes in a 25m pool\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pool_length_m":{"description":"Pool length in meters (e.g. 25 or 50).","exclusiveMinimum":0,"maximum":100,"title":"Pool Length M","type":"number"},"time_seconds":{"description":"Time to swim one length, in seconds.","exclusiveMinimum":0,"maximum":600,"title":"Time Seconds","type":"number"},"stroke_count":{"description":"Number of strokes taken for that length.","maximum":60,"minimum":0,"title":"Stroke Count","type":"integer"}},"required":["pool_length_m","time_seconds","stroke_count"],"title":"swolf_scoreArguments","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/stroke_tips":{"post":{"operationId":"stroke_tips","summary":"Technique and distance-per-stroke efficiency tips, by stroke. Use for \"how do I improve my freestyle","description":"Technique and distance-per-stroke efficiency tips, by stroke. Use for \"how do I improve my freestyle\n    technique\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"stroke":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"freestyle | backstroke | breaststroke | butterfly. Omit for all.","title":"Stroke"}},"title":"stroke_tipsArguments","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}}}}