Skip to main content
Glama

Detect itinerary gaps

detect_journey_gaps
Read-only

Finds gaps between consecutive journeys where a traveler's location is unaccounted for (arrival of one journey to departure of the next spans more than a day in a different place). Each gap suggests the likely origin/destination and the number of unaccounted days — useful for spotting missing journeys before they skew residency/Schengen counts. Dates are ISO 8601. Omit personId for the ledger's self person.

Input Schema

NameRequiredDescriptionDefault
personIdNoTripLedger person to calculate for. Omit for the ledger's self person.

Output Schema

NameRequiredDescriptionDefault
gapsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world). The description adds genuine operational context beyond that: the definition of a gap, what each gap result contains (likely origin/destination, unaccounted day count), and the date format convention. It stops short of describing edge cases such as gaps at the beginning/end of the ledger.

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

Conciseness5/5

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

Three sentences, front-loaded with the detection rule, followed by the output shape and the usage motivation. Every sentence earns its place with no filler or restatement of the name.

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?

An output schema exists, so return values need not be fully spelled out, yet the description still summarizes the useful fields. For a one-parameter read-only analysis tool, nothing an agent needs to call it correctly is missing.

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 100% for the single personId parameter, so baseline is a 3. The description adds meaning by restating the defaulting behavior ('Omit personId for the ledger's self person'), which clarifies the implicit default rather than merely repeating the schema.

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?

States a specific verb and resource ('Finds gaps between consecutive journeys') plus the precise detection rule (arrival-to-departure span exceeding a day in a different location), which clearly separates it from sibling list/get tools. An agent can tell that this is an analysis tool, not a CRUD operation on journeys.

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?

Gives a concrete when-to-use context: spotting missing journeys before they skew residency/Schengen counts, which implicitly ties it to check_schengen_status and get_residency_status. It does not explicitly say when not to use it or name the alternative tools outright, so it falls short of a 5.

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