Skip to main content
Glama
felipebasurto

viajante

Validate itinerary

validate_itinerary
Read-onlyIdempotent

Validate a selected flight itinerary against constraints like arrival deadlines and stay durations, ensuring chronological order with local, tri-state results.

Instructions

Validate selected v2 flight offers locally, without fetching. Pass legs in travel order, each with its exact query and one selected offer. The result is tri-state: unknown evidence never becomes pass. arrival_deadline is an ISO date and time: an explicit offset is compared in UTC, a naive time is local at the arrival airport. chronological checks owned segment instants. min_stay_days and max_stay_days use owned journey dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
legsYes
currencyNo
constraintsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
empty_noteYes
error_codeYes
observed_atYes
retry_afterYes
completenessYes
empty_reasonYes
observed_at_basisYes
retry_after_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.5.2
    • removedInput schema / properties / constraints / title
      Removed value: -"Constraints"
    • removedInput schema / properties / currency / title
      Removed value: -"Currency"
    • removedInput schema / properties / legs / title
      Removed value: -"Legs"
    • removedInput schema / title
      Removed value: -"validate_itineraryArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "completeness": {
      +      "enum": [
      +        "complete",
      +        "partial",
      +        "blocked"
      +      ],
      +      "type": "string"
      +    },
      +    "empty_note": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "empty_reason": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "provider_empty",
      +            "filtered_out",
      +            "not_loaded"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "error_code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "observed_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "observed_at_basis": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "provider",
      +            "fetch"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "retry_after": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "retry_after_seconds": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "status": {
      +      "enum": [
      +        "ok",
      +        "no_results",
      +        "rate_limited",
      +        "blocked",
      +        "timeout",
      +        "failed"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "completeness",
      +    "empty_reason",
      +    "empty_note",
      +    "error_code",
      +    "retry_after",
      +    "retry_after_seconds",
      +    "observed_at",
      +    "observed_at_basis"
      +  ],
      +  "type": "object"
      +}
  2. Addedv1.4.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent and non-destructive traits, so the bar is lower; the description still adds real behavior: local-only execution with no fetch, and a tri-state result where 'unknown evidence never becomes pass'. Timezone resolution rules (offset compared in UTC, naive time local at arrival airport) further disclose non-obvious semantics.

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?

Front-loaded and free of filler, but the final two sentences rely on terse domain jargon ('chronological checks owned segment instants', 'owned journey dates') that costs comprehension. Every sentence earns its place, yet the phrasing is compressed past clarity in places.

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

Completeness4/5

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

For a complex nested tool the description covers ordering, the exact-input contract, tri-state semantics and timezone handling, and the output schema exists so return formatting needn't be restated. Remaining gaps — full constraints fields and failure/error behavior — are real but secondary given the output schema's presence.

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

Parameters4/5

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

Schema coverage is 0% and the objects are opaque (additionalProperties: true), so the description carries the burden and largely meets it: legs must be in travel order with an exact query plus one selected offer, and constraints keys arrival_deadline, min_stay_days and max_stay_days are explained with their date/time semantics. It stops short of enumerating the full constraints shape or the currency parameter, so it is not exhaustive.

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

Purpose4/5

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

States a specific verb+resource ('validate selected v2 flight offers') and adds the key distinguishing constraint 'locally, without fetching', which separates it from fetch-based siblings like recheck_offer. It is clear about what is validated, though it never names the sibling it contrasts with.

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

Usage Guidelines3/5

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

The phrase 'without fetching' implies this is the cheap/local alternative to a networked recheck, and 'Pass legs in travel order, each with its exact query and one selected offer' gives invocation context. However, no sibling is named and no explicit when-not condition is stated, so the agent must infer the boundary.

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