Skip to main content
Glama

Change legs

leg_write
Destructive

Change a trip's ordered legs: create, update, delete, reorder (a full leg-id permutation, reassigning seq 1..N), and fill a leg's wind from a weather service (fetch_weather). A leg backed by a track (statsSource: 'track') rejects an update that touches any computed stats/coordinate/time field with a stats_readonly error — its startName/endName/notes stay editable regardless. A leg spans at most 60 days from startTime to endTime (24-hour days, exactly 60 allowed); longer is leg_too_long (422) on create and on an update that changes a time — split a longer passage into several legs. The weather fields are hand-entered observations, except the wind pair when weatherSource is 'open_meteo': windSpeedKn is true wind speed in knots, windDirDeg an integer 0-359 in meteorological convention (the direction the wind blows FROM), seaState the Douglas degree of sea 0-9. They stay editable on EVERY leg, track-backed or not, because no GPX file records them. fetch_weather fills the leg's WIND (speed and direction, never sea state) from the free Open-Meteo service: it resolves the position and time window from the leg's own data (its track's middle point, else its endpoint midpoint, else its start) and stores the arithmetic mean of the hourly speeds over that window plus their SPEED-WEIGHTED circular mean direction, stamping weatherSource 'open_meteo' and weatherFetchedAt — except when the window was a dead calm, which yields no direction: a hand-entered windDirDeg then survives and the response says weatherSource 'manual' instead, because the stamp must never attribute a hand-typed value to the provider. This is the ONLY action that makes an outbound network call on the caller's behalf, it is rate-limited to 30 per hour per user, and it overwrites whatever wind the leg already had, hand-entered included — unless the leg changes while the provider is being asked, in which case nothing is written and it answers stale_write with the current version (the concurrent edit wins; call it again). A later hand-edit of either WIND field flips weatherSource back to 'manual' and clears weatherFetchedAt; writing seaState does NOT, because the pair records where the wind came from and sea state is never fetched. A leg with no usable coordinates or no usable time window is weather_no_position (422); an upstream failure or a date the provider does not cover is weather_unavailable (503). IDs are 6-character case-sensitive alphanumeric strings. Timestamps are UTC ISO 8601. Distances are integer meters. Durations are integer seconds.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "create",
      -        "type": "string"
      -      },
      -      "data": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "avgSpeedKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "distanceM": {
      -            "anyOf": [
      -              {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "durationMovingS": {
      -            "anyOf": [
      -              {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "durationTotalS": {
      -            "anyOf": [
      -              {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "endLat": {
      -            "anyOf": [
      -              {
      -                "maximum": 90,
      -                "minimum": -90,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "endLon": {
      -            "anyOf": [
      -              {
      -                "maximum": 180,
      -                "minimum": -180,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "endName": {
      -            "maxLength": 200,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "endTime": {
      -            "anyOf": [
      -              {
      -                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "maxSpeed10mKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "maxSpeed1mKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "maxSpeed5mKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "notes": {
      -            "anyOf": [
      -              {
      -                "maxLength": 4000,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "seaState": {
      -            "anyOf": [
      -              {
      -                "maximum": 9,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "startLat": {
      -            "anyOf": [
      -              {
      -                "maximum": 90,
      -                "minimum": -90,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "startLon": {
      -            "anyOf": [
      -              {
      -                "maximum": 180,
      -                "minimum": -180,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "startName": {
      -            "maxLength": 200,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "startTime": {
      -            "anyOf": [
      -              {
      -                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "windDirDeg": {
      -            "anyOf": [
      -              {
      -                "maximum": 359,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "windSpeedKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 200,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "required": [
      -          "startName",
      -          "endName"
      -        ],
      -        "type": "object"
      -      },
      -      "tripId": {
      -        "pattern": "^[0-9A-Za-z]{6}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "tripId",
      -      "data"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "update",
      -        "type": "string"
      -      },
      -      "expectedUpdatedAt": {
      -        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      -        "type": "string"
      -      },
      -      "id": {
      -        "pattern": "^[0-9A-Za-z]{6}$",
      -        "type": "string"
      -      },
      -      "patch": {
      -        "additionalProperties": false,
      -        "minProperties": 1,
      -        "properties": {
      -          "avgSpeedKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "distanceM": {
      -            "anyOf": [
      -              {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "durationMovingS": {
      -            "anyOf": [
      -              {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "durationTotalS": {
      -            "anyOf": [
      -              {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "endLat": {
      -            "anyOf": [
      -              {
      -                "maximum": 90,
      -                "minimum": -90,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "endLon": {
      -            "anyOf": [
      -              {
      -                "maximum": 180,
      -                "minimum": -180,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "endName": {
      -            "maxLength": 200,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "endTime": {
      -            "anyOf": [
      -              {
      -                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "maxSpeed10mKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "maxSpeed1mKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "maxSpeed5mKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 100,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "notes": {
      -            "anyOf": [
      -              {
      -                "maxLength": 4000,
      -                "minLength": 1,
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "seaState": {
      -            "anyOf": [
      -              {
      -                "maximum": 9,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "startLat": {
      -            "anyOf": [
      -              {
      -                "maximum": 90,
      -                "minimum": -90,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "startLon": {
      -            "anyOf": [
      -              {
      -                "maximum": 180,
      -                "minimum": -180,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "startName": {
      -            "maxLength": 200,
      -            "minLength": 1,
      -            "type": "string"
      -          },
      -          "startTime": {
      -            "anyOf": [
      -              {
      -                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "windDirDeg": {
      -            "anyOf": [
      -              {
      -                "maximum": 359,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          },
      -          "windSpeedKn": {
      -            "anyOf": [
      -              {
      -                "maximum": 200,
      -                "minimum": 0,
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ]
      -          }
      -        },
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id",
      -      "patch"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "delete",
      -        "type": "string"
      -      },
      -      "id": {
      -        "pattern": "^[0-9A-Za-z]{6}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "reorder",
      -        "type": "string"
      -      },
      -      "legIds": {
      -        "items": {
      -          "pattern": "^[0-9A-Za-z]{6}$",
      -          "type": "string"
      -        },
      -        "maxItems": 200,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "tripId": {
      -        "pattern": "^[0-9A-Za-z]{6}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "tripId",
      -      "legIds"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "fetch_weather",
      -        "type": "string"
      -      },
      -      "id": {
      -        "pattern": "^[0-9A-Za-z]{6}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "create",
      +        "type": "string"
      +      },
      +      "data": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "avgSpeedKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "distanceM": {
      +            "anyOf": [
      +              {
      +                "maximum": 266688000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "durationMovingS": {
      +            "anyOf": [
      +              {
      +                "maximum": 5184000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "durationTotalS": {
      +            "anyOf": [
      +              {
      +                "maximum": 5184000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "endLat": {
      +            "anyOf": [
      +              {
      +                "maximum": 90,
      +                "minimum": -90,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "endLon": {
      +            "anyOf": [
      +              {
      +                "maximum": 180,
      +                "minimum": -180,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "endName": {
      +            "maxLength": 200,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "endTime": {
      +            "anyOf": [
      +              {
      +                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "maxSpeed10mKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "maxSpeed1mKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "maxSpeed5mKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "notes": {
      +            "anyOf": [
      +              {
      +                "maxLength": 4000,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "seaState": {
      +            "anyOf": [
      +              {
      +                "maximum": 9,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "startLat": {
      +            "anyOf": [
      +              {
      +                "maximum": 90,
      +                "minimum": -90,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "startLon": {
      +            "anyOf": [
      +              {
      +                "maximum": 180,
      +                "minimum": -180,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "startName": {
      +            "maxLength": 200,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "startTime": {
      +            "anyOf": [
      +              {
      +                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "windDirDeg": {
      +            "anyOf": [
      +              {
      +                "maximum": 359,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "windSpeedKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 200,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "startName",
      +          "endName"
      +        ],
      +        "type": "object"
      +      },
      +      "tripId": {
      +        "pattern": "^[0-9A-Za-z]{6}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "tripId",
      +      "data"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "update",
      +        "type": "string"
      +      },
      +      "expectedUpdatedAt": {
      +        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      +        "type": "string"
      +      },
      +      "id": {
      +        "pattern": "^[0-9A-Za-z]{6}$",
      +        "type": "string"
      +      },
      +      "patch": {
      +        "additionalProperties": false,
      +        "minProperties": 1,
      +        "properties": {
      +          "avgSpeedKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "distanceM": {
      +            "anyOf": [
      +              {
      +                "maximum": 266688000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "durationMovingS": {
      +            "anyOf": [
      +              {
      +                "maximum": 5184000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "durationTotalS": {
      +            "anyOf": [
      +              {
      +                "maximum": 5184000,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "endLat": {
      +            "anyOf": [
      +              {
      +                "maximum": 90,
      +                "minimum": -90,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "endLon": {
      +            "anyOf": [
      +              {
      +                "maximum": 180,
      +                "minimum": -180,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "endName": {
      +            "maxLength": 200,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "endTime": {
      +            "anyOf": [
      +              {
      +                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "maxSpeed10mKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "maxSpeed1mKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "maxSpeed5mKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 100,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "notes": {
      +            "anyOf": [
      +              {
      +                "maxLength": 4000,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "seaState": {
      +            "anyOf": [
      +              {
      +                "maximum": 9,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "startLat": {
      +            "anyOf": [
      +              {
      +                "maximum": 90,
      +                "minimum": -90,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "startLon": {
      +            "anyOf": [
      +              {
      +                "maximum": 180,
      +                "minimum": -180,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "startName": {
      +            "maxLength": 200,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "startTime": {
      +            "anyOf": [
      +              {
      +                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,3})?Z$",
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "windDirDeg": {
      +            "anyOf": [
      +              {
      +                "maximum": 359,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "windSpeedKn": {
      +            "anyOf": [
      +              {
      +                "maximum": 200,
      +                "minimum": 0,
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "id",
      +      "patch"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "delete",
      +        "type": "string"
      +      },
      +      "id": {
      +        "pattern": "^[0-9A-Za-z]{6}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "reorder",
      +        "type": "string"
      +      },
      +      "legIds": {
      +        "items": {
      +          "pattern": "^[0-9A-Za-z]{6}$",
      +          "type": "string"
      +        },
      +        "maxItems": 200,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "tripId": {
      +        "pattern": "^[0-9A-Za-z]{6}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "tripId",
      +      "legIds"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "fetch_weather",
      +        "type": "string"
      +      },
      +      "id": {
      +        "pattern": "^[0-9A-Za-z]{6}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "id"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations only mark the tool destructive, but the description discloses rate limits (30 per hour per user), a single outbound network call, overwrite behavior, a concurrency stale_write response with the current version, and specific error codes (422 leg_too_long, stats_readonly, weather_no_position, weather_unavailable). It also explains side effects invisible from the schema, such as how the weatherSource stamp changes and how a hand edit of a wind field flips the source back to manual.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded correctly with the action list, and almost every sentence carries a real constraint. However, the wind and fetch_weather section is dense and repetitive: the calm-case and stamp rules are explained across multiple clauses, and the semantics of weatherSource are restated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although no output schema exists, the description covers everything needed to call the tool safely: units, ID format, time-window rules, concurrency handling, error codes, and how each action's side effects modify the leg. No material gap remains for a tool with this many side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers 100% of the parameters, but the description adds meaning to fields the schema only constrains: windDirDeg is meteorological convention in degrees FROM, seaState is the Douglas degree 0-9, windSpeedKn is in knots, and timestamps, distances, and durations use UTC ISO 8601, integer meters, and integer seconds. It also explains what statsSource 'track' does to editable fields, which is not otherwise inferable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource (a trip's ordered legs) and enumerates the exact operations: create, update, delete, reorder, and fetch_weather. That makes it unambiguous and clearly distinct from leg_read in the sibling set, which is the read counterpart to this write tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete conditions for individual actions: split a passage into several legs when it exceeds 60 days, and call fetch_weather only when wind should be filled from the provider. It never states when not to use this tool instead of a sibling such as track_write, so the guidance is clear enough to select an action but incomplete for choosing between tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources