stl_gtfs_query
Execute read-only SQL queries on GTFS transit data to retrieve schedules, routes, and stops. Returns results with enforced limits.
Instructions
Run one read-only SQL query against the imported GTFS feed.
Tables are the GTFS filenames without .txt: agency, stops, routes, trips, stop_times, calendar, calendar_dates, shapes, feed_info. All columns are TEXT, including numeric-looking ids -- leading zeros are meaningful in GTFS.
Writes, ATTACH and PRAGMA are denied at the database driver; a wall-clock timeout and row/byte caps are enforced. Only a single statement is accepted.
This is the general-purpose escape hatch: anything the named tools do not cover can be expressed here.
Args: sql: a single SELECT or WITH statement. limit: max rows (hard cap 1000).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "stl_gtfs_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No | ||
| snapshot | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |