Skip to content

armgit / fli

Public Imported from GitHub
0

Google Flights MCP, CLI and Python Library

Format and lint

Punit Aranid3f884b62093
diff --git a/fli/mcp/server.py b/fli/mcp/server.py
index fa65c54..0ed52f7 100755
--- a/fli/mcp/server.py
+++ b/fli/mcp/server.py
@@ -30,18 +30,14 @@ class FlightSearchRequest(BaseModel):
return_date: str | None = Field(
None, description="Return date in YYYY-MM-DD format for round trips"
)
- time_range: str | None = Field(
- None, description="Time range in 24h format (e.g., '6-20')"
- )
+ time_range: str | None = Field(None, description="Time range in 24h format (e.g., '6-20')")
airlines: list[str] | None = Field(
None, description="List of airline codes (e.g., ['BA', 'KL'])"
)
seat_class: str = Field(
"ECONOMY", description="Seat type: ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST"
)
- stops: str = Field(
- "ANY", description="Maximum stops: ANY, NON_STOP, ONE_STOP, TWO_PLUS_STOPS"
- )
+ stops: str = Field("ANY", description="Maximum stops: ANY, NON_STOP, ONE_STOP, TWO_PLUS_STOPS")
sort_by: str = Field(
"CHEAPEST",
description="Sort by: CHEAPEST, DURATION, DEPARTURE_TIME, ARRIVAL_TIME",
@@ -53,29 +49,19 @@ class CheapFlightSearchRequest(BaseModel):
from_airport: str = Field(description="Departure airport code (e.g., 'JFK')")
to_airport: str = Field(description="Arrival airport code (e.g., 'LHR')")
- from_date: str = Field(
- description="Start date for search range in YYYY-MM-DD format"
- )
+ from_date: str = Field(description="Start date for search range in YYYY-MM-DD format")
to_date: str = Field(description="End date for search range in YYYY-MM-DD format")
duration: int = Field(3, description="Duration of trip in days for round trips")
- round_trip: bool = Field(
- False, description="Whether to search for round-trip flights"
- )
+ round_trip: bool = Field(False, description="Whether to search for round-trip flights")
airlines: list[str] | None = Field(
None, description="List of airline codes (e.g., ['BA', 'KL'])"
)
seat_class: str = Field(
"ECONOMY", description="Seat type: ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST"
)
- stops: str = Field(
- "ANY", description="Maximum stops: ANY, NON_STOP, ONE_STOP, TWO_PLUS_STOPS"
- )
- time_range: str | None = Field(
- None, description="Time range in 24h format (e.g., '6-20')"
- )
- sort_by_price: bool = Field(
- False, description="Sort results by price (lowest to highest)"
- )
+ stops: str = Field("ANY", description="Maximum stops: ANY, NON_STOP, ONE_STOP, TWO_PLUS_STOPS")
+ time_range: str | None = Field(None, description="Time range in 24h format (e.g., '6-20')")
+ sort_by_price: bool = Field(False, description="Sort results by price (lowest to highest)")
mcp = FastMCP("Flight Search MCP Server")