# Fill days with routes or stops

> The fill_days MCP tool: fill days with routes or stops.

`fill_days` · writes · destructive

MCP only (no REST operation).

## What the model reads

Fills up to 15 days of a trip in ONE change, planning each with the app's planner: stop times, travel, the catalog card copied into each stop, and whether the day fits its time window. Each day takes a `source`: {"kind":"route","routeId"} stamps a saved route (from suggest_routes); {"kind":"stops","stops":[{"placeId"}]} composes the day from places in that order (from search_places). Name days by their ref from get_itinerary. If a day already has route content, set `replace: true` (its stops, transfers and notes are replaced; stays and flights are kept) or `replace: false` (added after them). Every day is planned before anything is written: one day that cannot be planned refuses the whole call, naming it. A place used on two days is listed in `overlaps`, not refused: tell the user. With dryRun, `alternatives` lists routes already checked to fit, for route days that do not fit or repeat a stop. Replacing many blocks needs `confirm` set to the trip's exact title.

Permissions: trips:write, catalog:read.
Set `dryRun: true` to preview the effect without writing anything.
Undo: the result names a change id; undo_change reverts it.

## Input

| Field | Type | Required | Description |
|---|---|---|---|
| `tripId` | uuid | yes |  |
| `days` | object[] | yes | max 15 items |
| `days[].day` | string | yes | max 64 chars |
| `days[].source` | object \| object | yes |  |
| `days[].startTime` | string |  |  |
| `replace` | boolean |  |  |
| `confirm` | string |  | max 300 chars |
| `dryRun` | boolean |  | Preview only: plan the change and return its effect without writing. |

## Input schema (JSON)

```json
{
  "type": "object",
  "properties": {
    "tripId": {
      "type": "string",
      "format": "uuid"
    },
    "days": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "source": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "route"
                  },
                  "routeId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "A saved route, from suggest_routes."
                  },
                  "variantKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "required": [
                  "kind",
                  "routeId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "stops"
                  },
                  "stops": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "placeId": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "From search_places."
                        },
                        "note": {
                          "type": "string",
                          "maxLength": 500
                        }
                      },
                      "required": [
                        "placeId"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 30,
                    "description": "The day's stops, in visiting order."
                  }
                },
                "required": [
                  "kind",
                  "stops"
                ],
                "additionalProperties": false
              }
            ]
          },
          "startTime": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$"
          }
        },
        "required": [
          "day",
          "source"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 15
    },
    "replace": {
      "type": "boolean"
    },
    "confirm": {
      "type": "string",
      "maxLength": 300
    },
    "dryRun": {
      "type": "boolean",
      "description": "Preview only: plan the change and return its effect without writing."
    }
  },
  "required": [
    "tripId",
    "days"
  ],
  "additionalProperties": false
}
```
