{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://mcp.myrmigo.com/v1/schema/route.json","title":"myrmigo.route/1","description":"An answer of POST /v1/reference (no run_id) or POST /v1/route. Fields and enum values may be added (the known values are listed as examples); ignore the ones you do not know.","type":"object","properties":{"schema":{"type":"string","const":"myrmigo.route/1","description":"The format id of this answer."},"surface":{"type":"string","description":"reference: POST /v1/reference and the anonymous MCP server. agent: POST /v1/route with a key.","examples":["reference","agent"]},"match":{"type":"string","description":"How the request matched a step guide, not whether the site was found. none: no guide for this task; with coverage L0 or L1 it is a normal reference answer. question, servicing_question, need_site: ask the user `question.ask_user` (when present), then call again with the chosen option's task or booked_via. For an option without booked_via (another site or travel agent), send the name the user gives as booked_via, or \"not sure\". out_of_scope: see `refusal`. exact, likely: a guide was found (agent surface, where the site allows it).","examples":["exact","likely","question","servicing_question","none","need_site","out_of_scope"]},"coverage":{"anyOf":[{"type":"string","examples":["L0","L1","L2"]},{"type":"null"}],"description":"L0: official site, entry page and channels. L1: also what to have ready, where the person acts and up to 3 dated facts. L2: also a step guide. null when no site was resolved."},"task":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"schema_action":{"type":"string"},"schema_object":{"type":"string"}},"required":["id","schema_action","schema_object"]},{"type":"null"}],"description":"The task Myrmigo understood: an id from GET /v1/intents. null when none fits."},"site":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"},"owner":{"type":"string","examples":["claimed","unclaimed"]}},"required":["id","name","domain","owner"]},{"type":"null"}],"description":"The site that services the booking. It can differ from `where` when booked_via names another company."},"servicing_party":{"anyOf":[{"type":"object","properties":{"site":{"type":"string"},"entity":{"type":"string"},"reference_type":{"type":"string","examples":["operator_pnr","seller_ref","either"]},"basis":{"type":"string","examples":["rule","where","booked_via","goal"]}},"required":["site","entity","reference_type","basis"]},{"type":"null"}],"description":"Which company services this booking, which booking reference it takes, and why."},"mode":{"type":"string","description":"How Myrmigo reads the site's terms for agents. unsigned: reference only. excluded: only the official route is given.","examples":["unsigned","co_pilot","agent_assist","excluded"]},"best_route":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","examples":["official_channel","guide","deep_link","human_contact"]},"ref":{"type":"string"},"label":{"type":"string"}},"required":["type","ref","label"]},{"type":"null"}],"description":"Where to go first. `ref` is a URL, or an MCP or API endpoint when type is official_channel."},"also_channels":{"description":"Further official channels for the task, after best_route.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","examples":["mcp","api","app","webmcp","cli"]},"ref":{"type":"string"},"label":{"type":"string"}},"required":["type","ref","label"]}},"disclosure":{"description":"A conflict-of-interest line about this site. Show it to the user with the answer whenever it is present.","type":"string"},"entry_url":{"description":"The official page where the task starts.","type":["string","null"]},"official_domains":{"type":"array","items":{"type":"string"}},"envelope":{"type":"object","properties":{"allowed_domains":{"type":"array","items":{"type":"string"}}},"required":["allowed_domains"],"description":"The hosts the agent navigates on for this task. Not a network allowlist: payment, bank approval (3-D Secure) and CAPTCHA load from other hosts."},"ask_user_first":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"prompt":{"type":"string"}},"required":["name","prompt"]},"description":"What to ask the user for before starting."},"human_only":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","examples":["login","mfa","captcha","3ds","travel_documents","identity_check","payment_details","irreversible_submit","legal_attestation"]},"note":{"type":"string"}},"required":["kind","note"]},"description":"Where the person acts themselves: payment, ID, sign-in, CAPTCHA, bank approval."},"checkpoints":{"type":"array","items":{"type":"string","examples":["login","mfa","captcha","3ds","travel_documents","identity_check","payment_details","irreversible_submit","legal_attestation"]}},"facts":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"value":{"type":"string"},"source_url":{"type":"string"},"quote":{"type":"string"},"as_of":{"type":"string"},"confirm_on_site":{"type":"boolean","const":true}},"required":["topic","value","source_url","as_of","confirm_on_site"]},"description":"Dated facts with their source. Confirm them on the site; quotes belong to their owners."},"health":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","examples":["ok","suspect","broken","insufficient_data"]},"success":{"type":"object","properties":{"rate":{"type":"number"},"ci95":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2},"n":{"type":"number"}},"required":["rate","ci95","n"]},"reported_by_orgs":{"anyOf":[{"type":"number"},{"type":"string","const":"<3"}]},"working_orgs":{"type":"number"}},"required":["state","reported_by_orgs"]},{"type":"null"}],"description":"How reliable the guide has been in reports, when there is one."},"guide":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"number"},"status":{"type":"string","examples":["unverified_seed","staff_verified","owner_verified","withdrawn"]},"verified":{"type":"object","properties":{"by":{"type":"string","examples":["staff","owner"]},"day":{"type":"string"}},"required":["by","day"]},"body_hash":{"type":"string"},"signature":{"type":["string","null"]},"rendering":{"type":"string","examples":["card","prose"]},"summary":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1,"maximum":40},"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"},"do":{"type":"string","examples":["goto","click","fill","choose","check","pick_date","press","wait_for","read","user"]},"target":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"match":{"type":"string","examples":["exact","contains"]},"within":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}},"required":["role"]},"nth":{"type":"integer","minimum":1,"maximum":10}},"required":["role"]},"url":{"type":"string","format":"uri"},"value":{"anyOf":[{"type":"string","pattern":"^\\{[a-z][a-z0-9_]{0,30}\\}$"},{"type":"object","properties":{"option":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}},"required":["option"]}]},"picker":{"type":"object","properties":{"open":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"match":{"type":"string","examples":["exact","contains"]},"within":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}},"required":["role"]},"nth":{"type":"integer","minimum":1,"maximum":10}},"required":["role"]},"next_month":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"match":{"type":"string","examples":["exact","contains"]},"within":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}},"required":["role"]},"nth":{"type":"integer","minimum":1,"maximum":10}},"required":["role"]},"day_label_format":{"type":"string","maxLength":40},"typed_input_ignored":{"type":"boolean"}}},"key":{"type":"string","examples":["Enter","Escape","Tab","ArrowDown","ArrowUp"]},"extract":{"maxItems":6,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,30}$"}},"expect":{"type":"object","properties":{"url_contains":{"type":"string","maxLength":80,"pattern":"^[/a-z0-9\\-_.{}]+$"},"text":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"sees":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"match":{"type":"string","examples":["exact","contains"]},"within":{"type":"object","properties":{"role":{"type":"string","examples":["button","link","textbox","searchbox","combobox","listbox","option","checkbox","radio","switch","tab","menuitem","dialog","alertdialog","heading","region","list","listitem","group","grid","gridcell","alert","text"]},"name":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}}},"required":["role"]},"nth":{"type":"integer","minimum":1,"maximum":10}},"required":["role"]},"absent":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(-[a-z]{4})?$"},"additionalProperties":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"timeout_s":{"type":"integer","minimum":1,"maximum":60}}},"optional":{"type":"boolean"},"for_each":{"type":"string","examples":["passenger","segment","room"]},"checkpoint":{"type":"string","examples":["login","mfa","captcha","3ds","travel_documents","identity_check","payment_details","irreversible_submit","legal_attestation"]},"gate":{"type":"object","properties":{"kind":{"type":"string","examples":["payment","irreversible","fee","data_submission"]},"show_user":{"maxItems":6,"type":"array","items":{"anyOf":[{"type":"string","pattern":"^\\{[a-z][a-z0-9_]{0,30}\\}$"},{"type":"string","pattern":"^\\$[a-z][a-z0-9_]{0,30}$"}]}}},"required":["kind","show_user"]},"pitfall":{"type":"string","examples":["consent_banner","upsell_modal","preselected_extra","date_picker_month_nav","typed_date_ignored","confirm_twice","type_to_confirm","decoy_button","late_modal","session_timeout","new_tab","iframe","chat_popup","accent_insensitive","voucher_default","fee","login_wall","captcha"]},"tip":{"type":"string","maxLength":140}},"required":["n","id","do"]}}},"required":["id","version","status","body_hash","signature","rendering","summary"]},{"type":"null"}],"description":"The step guide, when one is served (guide text: CC BY-SA 4.0, credit Myrmigo)."},"alternatives":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"why":{"type":"string"}},"required":["id","why"]}},"question":{"description":"Ask the user this, then call again with the chosen option's task or booked_via. For an option without booked_via (another site or travel agent), send the name the user gives as booked_via, or \"not sure\".","type":"object","properties":{"ask_user":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"task":{"type":"string"},"booked_via":{"type":"string"}},"required":["label"]}}},"required":["ask_user","options"]},"refusal":{"description":"Why the request is out of scope (match out_of_scope).","type":"string"},"warning":{"description":"For example \"NOT MAPPED: …\" when the named site is not in the catalog.","type":"string"},"rights_check":{"description":"On answers about a disrupted flight or a compensation claim (and an airline refund): the EU261/UK261 check for the flight, as the MCP tool and its REST route (POST /v1/rights), with the operating airline to send when the site maps to one. Not legal advice.","type":"object","properties":{"tool":{"type":"string","const":"check_flight_compensation"},"rest":{"type":"string"},"carrier":{"type":["string","null"]}},"required":["tool","rest","carrier"]},"flag_url":{"type":"string","description":"Where to report wrong or outdated content."},"card":{"type":"string","description":"The same answer as compact text for a model (what the MCP tool returns). Not a stable format: parse the fields, not the card."},"notice":{"type":"string","const":"unverified_third_party_reference"},"run_id":{"description":"Agent surface only: the handle for POST /v1/runs. Absent on /v1/reference.","type":["string","null"]}},"required":["schema","surface","match","coverage","task","site","servicing_party","mode","best_route","entry_url","official_domains","envelope","ask_user_first","human_only","checkpoints","facts","health","guide","alternatives","flag_url","card","notice"]}