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
| Name | Required | Description | Default |
|---|---|---|---|
| trip_identifier | Yes |
Input Schema (JSON Schema)
{
"properties": {
"trip_identifier": {
"title": "Trip Identifier",
"type": "string"
}
},
"required": [
"trip_identifier"
],
"title": "use_tripArguments",
"type": "object"
}
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()