search_trips
Find LSD trips available to users by searching with specific queries to understand their purposes and availability.
Instructions
Returns a list of objects with LSD trips available to the user and what each of them do.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- app.py:56-63 (handler)The main handler function for the 'search_trips' MCP tool. It uses a database connection to execute a 'SEARCH' query with the input parameter and formats the results into a list of trip dictionaries (author, name, description, statement, identifier). The @mcp.tool() decorator registers it as a tool.@mcp.tool() def search_trips(query: str) -> List[Dict[str, str]]: """Returns a list of objects with LSD trips available to the user and what each of them do.""" conn = establish_connection() with conn.cursor() as curs: curs.execute(f"SEARCH {query}") rows = curs.fetchall() return [{"AUTHOR": r[0], "NAME": r[1], "DESCRIPTION": r[2], "STATEMENT": r[3], "IDENTIFIER": r[4]} for r in rows]