Skip to main content
Glama

Search flights

search_flights

Find flights for any AENA airport in Spain. Filter arrivals or departures by flight number and local time window, with codeshares merged.

Instructions

List flights for an AENA airport (arrivals or departures). Codeshares of the same physical flight are collapsed into one entry by default. Filter by flight number and/or a local-time window (e.g. afternoon = fromLocal 12:00, toLocal 20:00). Times in the output are local Madrid time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoOnly flights on this local date (YYYY-MM-DD). Defaults to today when fromLocal/toLocal is set.
sourceNoauto
airportYesAirport IATA code, e.g. MAD, BCN, SCQ
toLocalNoOnly flights scheduled at or before this local time (HH:MM), e.g. 20:00 for afternoon
directionYes
fromLocalNoOnly flights scheduled at or after this local time (HH:MM), e.g. 12:00 for afternoon
hoursBackNoREST window: hours into the past
flightNumberNoFilter client-side, e.g. IB0459 or UX7235
hoursForwardNoREST window: hours into the future
collapseCodesharesNoCollapse codeshares of the same flight into one entry (default true)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses several useful behaviors: codeshares are collapsed by default, output times are in local Madrid time, and filtering supports flight number and local-time windows. These go beyond the schema and help the agent anticipate output quirks. Minor omissions like pagination or error behavior exist, but the description is still above average.

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 three sentences, front-loaded with the primary action, and every sentence adds distinct information (scope, codeshare behavior, filters, timezone). No padding or repetition. Ideal conciseness for a tool of this complexity.

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

Completeness3/5

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

For a tool with 10 parameters and no output schema, the description covers the core use case but omits some important context. It does not explain the two filtering modes (local-time window vs. REST window with hoursBack/hoursForward), nor the 'source' parameter (auto/website/rest). The date fallback behavior is also missing. These gaps may lead to under-utilization or misuse, so completeness is adequate but not thorough.

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 high (80%), so baseline is 3. The description adds semantic value by clarifying how fromLocal/toLocal work together ('afternoon = 12:00 to 20:00'), explicitly mentioning the flightNumber filter, and restating the default codeshare collapse behavior. This supplements the schema descriptions without being redundant.

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 clearly states the action ('List flights') and the specific resource ('AENA airport' with arrivals/departures). It also differentiates from siblings: get_flight (likely a single flight lookup) and list_airports (airport list), by explicitly scoping to flights with direction and filters.

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 provides clear context on when to use the tool (listing flights for an AENA airport with direction and optional filters). It does not explicitly mention alternatives or exclusion criteria, but the context is strong enough to guide selection among siblings. No misleading usage guidance is present.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MrGo2/aena-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server