use_trip
Trigger a specific trip on LSD by its identifier to interact with real-world data through the LSD SQL language, enabling efficient querying and data integration.
Instructions
Invokes a trip on LSD based on its identifier using the [ACCORDING TO] keywords.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trip_identifier | Yes |
Implementation Reference
- app.py:66-73 (handler)The handler function that executes the 'use_trip' tool logic by running an LSD trip query.def use_trip(trip_identifier: str) -> List[Dict[str, str]]: """Invokes a trip on LSD based on its identifier using the [ACCORDING TO] keywords.""" conn = establish_connection() with conn.cursor() as curs: curs.execute(f"ACCORDING TO {trip_identifier}") rows = curs.fetchall() return [list(r) for r in rows]
- app.py:65-65 (registration)Registers the 'use_trip' function as an MCP tool using the decorator.@mcp.tool()