get_tire_pressure_weekly_trends
Track and analyze weekly trends in tire pressure for your Tesla vehicles to ensure optimal performance and safety using data from your TeslaMate database.
Instructions
Get the tire pressure weekly trends for each car.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main_remote.py:118-126 (handler)Handler function that executes the predefined MCP tool by name. For 'get_tire_pressure_weekly_trends', it retrieves the ToolDefinition and executes the SQL query from 'tire_pressure_weekly_trend.sql' using the database manager.async def execute_predefined_tool(tool_name: str) -> List[Dict[str, Any]]: """Execute a predefined tool by name""" if not app_context: raise RuntimeError("Application context not initialized") tool = get_tool_by_name(tool_name) return await app_context.db_manager.execute_query_async( tool.sql_file, app_context.db_pool )
- src/tools.py:92-96 (registration)ToolDefinition registration specifying the tool name, description, and path to the SQL query file.ToolDefinition( name="get_tire_pressure_weekly_trends", description="Get the tire pressure weekly trends for each car. Monitors tire pressure changes and patterns by week.", sql_file="tire_pressure_weekly_trend.sql", ),
- main_remote.py:179-186 (registration)MCP tool registration loop that adds 'get_tire_pressure_weekly_trends' (and others) to the list of available tools with empty input schema.for tool_def in TOOL_DEFINITIONS: tools.append( types.Tool( name=tool_def.name, description=tool_def.description, inputSchema={"type": "object", "properties": {}}, ) )
- main_remote.py:184-185 (schema)Input schema definition for the tool (empty object, no parameters required).inputSchema={"type": "object", "properties": {}}, )
- main_remote.py:162-164 (handler)Routing logic in the main MCP call_tool handler that dispatches to execute_predefined_tool for this tool.else: result = await execute_predefined_tool(name)