Update a route
The update_route MCP tool: update a route.
update_route · writes · idempotent
REST: PATCH /v1/catalog/routes/{routeId}
What the model reads
Edits a route (read it first with get_route). A route is a day's walk through catalog places: stops in order, each a catalog place (punto) or activity (actividad) by placeId, with its own visit minutes (ownMinutes, null = the place's) and the LEG that arrives at it from the previous stop (mode: walking | transit | driving | bicycling, minutes, prose). intro and closing are the texts before and after. rules are how the planner uses it (structured: true lets it propose the route as a whole day). Send only what changes; stops replaces the whole list, and a pair of consecutive places that stays keeps its measured leg unless you send one. undo_change reverts it.
Permissions: catalog:write. Undo: the result names a change id; undo_change reverts it.
Input
| Field | Type | Required | Description |
|---|---|---|---|
routeId |
uuid | yes | |
title |
string | max 200 chars | |
intro |
string | object[] | The text before the first stop. | |
closing |
string | object[] | The text after the last stop. | |
stops |
object[] | The whole stop list, in order. Absent = unchanged. max 40 items | |
stops[].placeId |
uuid | yes | A catalog place (punto) or activity (actividad), by id. |
stops[].ownMinutes |
integer | null | This route's own visit minutes for the stop; null or absent = the place's own. | |
stops[].leg |
object | How you get HERE from the previous stop (ignored on the first). Absent = keep the measured leg when the same pair was already on the route. | |
stops[].leg.mode |
"walking" | "transit" | "driving" | "bicycling" | null | ||
stops[].leg.minutes |
integer | null | Travel minutes from the previous stop. | |
stops[].leg.prose |
string | object[] | How to get here from the previous stop. | |
rules |
object | The route's planning rules; only the fields sent change. destinos is derived from the stops. |
|
rules.structured |
boolean | true: the planner may propose it as a whole day (needs at least two stops). | |
rules.base |
string | max 200 chars | |
rules.tipo |
"dia_entero" | "medio_dia" | "excursion" | "tematica" | "con_experiencias" | "llegada" | null | ||
rules.duracion |
"medio_dia" | "dia_entero" | "dia_entero_largo" | null | ||
rules.ritmo |
"relajado" | "equilibrado" | "intenso" | null | ||
rules.incompatibleDias |
"lunes" | "martes" | "miercoles" | "jueves" | "viernes" | "sabado" | "domingo"[] | Weekdays it cannot run. max 7 items | |
rules.requiereReserva |
boolean | ||
rules.notasUso |
string[] | max 20 items | |
expectedUpdatedAt |
datetime |
Input schema (JSON)
{
"type": "object",
"properties": {
"routeId": {
"type": "string",
"format": "uuid"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"intro": {
"anyOf": [
{
"type": "string",
"maxLength": 10000
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
},
"maxItems": 200
}
],
"description": "The text before the first stop."
},
"closing": {
"anyOf": [
{
"type": "string",
"maxLength": 10000
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
},
"maxItems": 200
}
],
"description": "The text after the last stop."
},
"stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"placeId": {
"type": "string",
"format": "uuid",
"description": "A catalog place (`punto`) or activity (`actividad`), by id."
},
"ownMinutes": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1440
},
{
"type": "null"
}
],
"description": "This route's own visit minutes for the stop; null or absent = the place's own."
},
"leg": {
"type": "object",
"properties": {
"mode": {
"anyOf": [
{
"type": "string",
"enum": [
"walking",
"transit",
"driving",
"bicycling"
]
},
{
"type": "null"
}
]
},
"minutes": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1440
},
{
"type": "null"
}
],
"description": "Travel minutes from the previous stop."
},
"prose": {
"anyOf": [
{
"type": "string",
"maxLength": 10000
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
},
"maxItems": 200
}
],
"description": "How to get here from the previous stop."
}
},
"additionalProperties": false,
"description": "How you get HERE from the previous stop (ignored on the first). Absent = keep the measured leg when the same pair was already on the route."
}
},
"required": [
"placeId"
],
"additionalProperties": false
},
"maxItems": 40,
"description": "The whole stop list, in order. Absent = unchanged."
},
"rules": {
"type": "object",
"properties": {
"structured": {
"type": "boolean",
"description": "true: the planner may propose it as a whole day (needs at least two stops)."
},
"base": {
"type": "string",
"maxLength": 200
},
"tipo": {
"anyOf": [
{
"type": "string",
"enum": [
"dia_entero",
"medio_dia",
"excursion",
"tematica",
"con_experiencias",
"llegada"
]
},
{
"type": "null"
}
]
},
"duracion": {
"anyOf": [
{
"type": "string",
"enum": [
"medio_dia",
"dia_entero",
"dia_entero_largo"
]
},
{
"type": "null"
}
]
},
"ritmo": {
"anyOf": [
{
"type": "string",
"enum": [
"relajado",
"equilibrado",
"intenso"
]
},
{
"type": "null"
}
]
},
"incompatibleDias": {
"type": "array",
"items": {
"type": "string",
"enum": [
"lunes",
"martes",
"miercoles",
"jueves",
"viernes",
"sabado",
"domingo"
]
},
"maxItems": 7,
"description": "Weekdays it cannot run."
},
"requiereReserva": {
"type": "boolean"
},
"notasUso": {
"type": "array",
"items": {
"type": "string",
"maxLength": 500
},
"maxItems": 20
}
},
"additionalProperties": false,
"description": "The route's planning rules; only the fields sent change. `destinos` is derived from the stops."
},
"expectedUpdatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"routeId"
],
"additionalProperties": false
}