Skip to main content
Glama

Find opportunities

find_opportunities
Read-only

Rank every published rail by how its LAST measurement compares with its own tracked history, so a caller can ask 'where is it unusually cheap right now?' in one call instead of one call per destination. Percentages are over observed days, not the calendar span. latest_cheaper_than_pct_of_days is the same number as cheaper_than_pct under a name that states its direction (higher = cheaper than more of the tracked days). stale_rails says how many of the rails THIS call matched are past their own freshness boundary today, with the day it was judged (as_of), so the caller need not subtract dates per row. Descriptive only: it ranks observations and gives no verdict. Rails with too little history are returned under excluded, never dropped silently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
railNooptional: restrict to one rail
sortNooptional (default cheapest_vs_history): 'cheapest_vs_history' ranks by the share of tracked days that were dearer; 'most_below_median' ranks by how far the last measurement sits below the median, relatively
limitNooptional (default 10): how many rows to return; 'matched' reports the count before the cap
partyNooptional: '<adults>-<children>', e.g. '2-2' - the same A-C shape the price streams are keyed on
min_history_daysNooptional (default 30): rails measured for fewer days are listed under 'excluded'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "currency": {
      +          "type": "string"
      +        },
      +        "disclaimer": {
      +          "type": "string"
      +        },
      +        "excluded": {
      +          "items": {
      +            "properties": {
      +              "destination": {
      +                "type": "string"
      +              },
      +              "history_days": {
      +                "type": "integer"
      +              },
      +              "rail": {
      +                "enum": [
      +                  "flight",
      +                  "package"
      +                ],
      +                "type": "string"
      +              },
      +              "reason": {
      +                "type": "string"
      +              },
      +              "resort_key": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "destination",
      +              "rail",
      +              "reason",
      +              "history_days"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "generated": {
      +          "description": "the OLDEST `generated` among the rows returned",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "license": {
      +          "properties": {
      +            "attribution": {
      +              "type": "string"
      +            },
      +            "id": {
      +              "type": "string"
      +            },
      +            "url": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "url",
      +            "attribution"
      +          ],
      +          "type": "object"
      +        },
      +        "matched": {
      +          "description": "rows before the `limit` cap",
      +          "type": "integer"
      +        },
      +        "min_history_days": {
      +          "type": "integer"
      +        },
      +        "opportunities": {
      +          "items": {
      +            "properties": {
      +              "cheaper_than_pct": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "destination": {
      +                "type": "string"
      +              },
      +              "generated": {
      +                "type": "string"
      +              },
      +              "history_days": {
      +                "type": "integer"
      +              },
      +              "is_series_min": {
      +                "type": "boolean"
      +              },
      +              "latest": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "latest_cheaper_than_pct_of_days": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "latest_stale_after_days": {
      +                "type": "number"
      +              },
      +              "measured": {
      +                "properties": {
      +                  "days": {
      +                    "type": "integer"
      +                  },
      +                  "from": {
      +                    "type": "string"
      +                  },
      +                  "to": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "days",
      +                  "from",
      +                  "to"
      +                ],
      +                "type": "object"
      +              },
      +              "median": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "min": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "party": {
      +                "properties": {
      +                  "adults": {
      +                    "type": "integer"
      +                  },
      +                  "children": {
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "adults",
      +                  "children"
      +                ],
      +                "type": "object"
      +              },
      +              "rail": {
      +                "enum": [
      +                  "flight",
      +                  "package"
      +                ],
      +                "type": "string"
      +              },
      +              "resort": {
      +                "type": "string"
      +              },
      +              "resort_key": {
      +                "type": "string"
      +              },
      +              "title": {
      +                "properties": {
      +                  "cs": {
      +                    "type": "string"
      +                  },
      +                  "en": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "cs",
      +                  "en"
      +                ],
      +                "type": "object"
      +              },
      +              "url": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "destination",
      +              "title",
      +              "url",
      +              "rail",
      +              "party",
      +              "latest",
      +              "median",
      +              "min",
      +              "cheaper_than_pct",
      +              "latest_cheaper_than_pct_of_days",
      +              "is_series_min",
      +              "history_days",
      +              "measured",
      +              "generated"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "schema": {
      +          "type": "string"
      +        },
      +        "sort": {
      +          "enum": [
      +            "cheapest_vs_history",
      +            "most_below_median"
      +          ],
      +          "type": "string"
      +        },
      +        "stale_rails": {
      +          "description": "How many of the rails in scope are past their own freshness boundary on `as_of` (Europe/Prague).",
      +          "properties": {
      +            "as_of": {
      +              "type": "string"
      +            },
      +            "count": {
      +              "type": "integer"
      +            },
      +            "keys": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "of": {
      +              "type": "integer"
      +            },
      +            "unknown": {
      +              "type": "integer"
      +            }
      +          },
      +          "required": [
      +            "as_of",
      +            "of",
      +            "count",
      +            "keys"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "schema",
      +        "generated",
      +        "sort",
      +        "min_history_days",
      +        "matched",
      +        "stale_rails",
      +        "opportunities",
      +        "excluded",
      +        "disclaimer"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "description": "tool-level failure, returned with isError: true",
      +      "properties": {
      +        "error": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "code": {
      +              "type": "string"
      +            },
      +            "message": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "message"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already convey read-only and non-destructive behavior, and the description adds substantial context beyond them: percentages are over observed days rather than calendar span, low-history rails are returned under excluded rather than silently dropped, stale_rails includes the as_of judgement day, and the tool is explicitly described as giving no verdict.

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?

The description is longer than minimal but every sentence earns its place: it front-loads the ranking purpose, then adds caveats and field clarifications that would otherwise cause misinterpretation. Backticked field names and a clear logical order keep it navigable despite its length.

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?

For a tool with five optional parameters, read-only annotations, and an output schema, the description covers everything needed to call it correctly: cross-rail scope, history-threshold behavior, stale-rail handling, and the descriptive-only nature. Nothing critical is left ambiguous.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description does not add material input-parameter meaning beyond the schema; it clarifies output-field semantics such as latest_cheaper_than_pct_of_days and stale_rails, which is useful but not parameter-level enrichment.

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 opens with a specific verb and resource: 'Rank every published rail by how its LAST measurement compares with its own tracked history.' It states the exact caller question ('where is it unusually cheap right now?') and contrasts it with one call per destination, making the tool's scope and its distinction from per-rail history lookups clear.

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?

It provides a clear context for use: a single cross-rail call to surface unusually cheap-vs-history opportunities. However, it does not explicitly name sibling alternatives such as current_vs_history or describe when not to use this tool, so it stops short of a full when/when-not guide.

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