Create race plan
create_race_planPrimary CourseProfiler tool for creating a personalized race plan and optional PDF. Use this after obtaining both a course input and runner input. Course input may be course_file, course.source with kind=url/artifact/raw_file, or course.crsprof_artifact_id. Do not use raw_json or reconstruct/synthesize a course from roadbooks, checkpoint tables, elevation profiles, aid-station lists, or screenshots; those are enrichment/context only and are not valid course geometry. Runner input may be runner_profile_file, runner.sources, or an already-converted runner.usrprof_artifact_id. Use generate_runner_profile for user-approved evidence or uploaded .usrprof source_file artifacts; do not silently use all local files. Ask about intent only when unclear; profile_intent does not perform server-side selection. Hosted MCP cannot read local paths: use inline content/base64 or REST POST /api/artifact-uploads and pass source_file artifacts through sources, not usrprof_artifact_id. There is no raw-byte MCP upload tool. get_artifact_upload_requirements and get_runner_profile_requirements explain files, evidence, and Strava consent. If the user provides only a race name, check the CourseProfiler race catalog manifest first, but do not rely on uniqueness alone: confirm the catalog match is the same event/course/location before using its assetPath CRSProf URL. Auto-resolution only uses exact/strong catalog matches; weak matches require explicit confirmation or an explicit course.source URL/artifact. Use search_race_catalog first when the user may need to choose among multiple matching catalog courses or when the match confidence is not clearly exact/strong. If no catalog match exists, try to resolve it to a fetchable official GPX/FIT/CRSProf URL or ask the user to upload/provide the course file or URL; do not stop at the race name. Third-party route hosts such as Wikiloc may return 403 to server fetches. If an official or third-party GPX/FIT/CRSProf URL cannot be fetched or is blocked, stop and ask the user to download the official file and upload it through POST /api/artifact-uploads, then continue with the returned source_file artifact ID. Do not create a race plan until a real route file/trusted CRSProf is available. Use import_course to create a CRSProf, enrich_course_waypoints to add structured aid stations/resources/cutoffs, then generate_course_segments before creating the race plan. Catalog CRSProf files may already include official waypoints/resources/cutoffs; if they do not, call enrich_course_waypoints or ask the user for structured aid/resource/cutoff data before segmentation. If official pages and regulation PDFs disagree, or exact aid locations are not fully listed in machine-readable form, ask the user to confirm and include only confirmed aid stations; do not invent missing locations. Route-only plans are incomplete unless the user explicitly accepts missing aid/resource details. If browsing/search is available, prefer the catalog first, then official race sources and direct GPX links over generic home pages; course-only pacing is incomplete without waypoint/resource enrichment. If runner data is missing, ask for a USRProf file/artifact or runner evidence, explain that the profile drives estimated times plus insights such as uphill running limit, durability/fatigue tendencies, downhill sensitivity, and terrain strengths/weaknesses, generate a segment-evidence runner profile with generate_runner_profile after user-approved evidence selection, and do not invent personalized fitness data. This race-plan flow creates a personalized plan/PDF only; it does not submit the course to the public catalog and does not need to. Only call submit_course when the user explicitly asks to submit/add/update a course for catalog review. Returns a top-level job with artifact role metadata; use get_job to poll and get_artifact to fetch outputs.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_race_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | |||
| course | No | ||
| runner | No | ||
| estimate | No | ||
| race_name | No | Race/course name to resolve through the CourseProfiler catalog when no course source is provided, e.g. Val d'Aran PDA. | |
| course_file | No | Use this only when the MCP client provides an inline/proxied GPX, FIT, CRSProf, or ZIP-with-one-GPX file object. Provide content for text GPX/XML/JSON/CRSProf, base64 for FIT/ZIP/binary, or a fetchable URL. Bare local filesystem paths and file:// URLs are rejected. Hosted clients with local files must use the REST POST /api/artifact-uploads flow outside MCP and pass the returned source_file artifact as course.source.kind=artifact. | |
| runner_profile_file | No | Use this only when the MCP client provides an inline/proxied USRProf runner profile file object. Provide content for text USRProf/JSON or base64 for binary. Personalized plans require runner input. Bare local filesystem paths and file:// URLs are rejected. Hosted clients with local .usrprof files should use POST /api/artifact-uploads and pass the returned source_file artifact via runner.sources[{kind:'artifact'}], not usrprof_artifact_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | No | ||
| job_id | Yes | CourseProfiler job ID to poll with get_job. | |
| status | Yes | Job status, e.g. queued, running, succeeded, or failed. | |
| progress | No | ||
| warnings | No | ||
| created_at | No | ISO-8601 creation timestamp. | |
| expires_at | No | ISO-8601 expiration timestamp. | |
| started_at | No | ISO-8601 start timestamp, when available. | |
| status_url | No | Relative API URL for polling this job. | |
| completed_at | No | ISO-8601 completion timestamp, when available. | |
| result_artifacts | No | Artifacts produced by the job, including role metadata. | |
| submission_request_id | No | Request ID that originally allocated this job; absent in legacy metadata. |