get_software_update_history
Retrieve firmware update history for Tesla vehicles, tracking version changes and software evolution over time.
Instructions
Get the software update history for each car. Tracks firmware updates and version changes over time.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.py:87-91 (registration)Defines the ToolDefinition for 'get_software_update_history', including its description and the associated SQL query file.ToolDefinition( name="get_software_update_history", description="Get the software update history for each car. Tracks firmware updates and version changes over time.", sql_file="software_update_history.sql", ),
- main.py:22-28 (handler)Handler factory for local STDIO server that creates a function to execute the tool's SQL query synchronously.def create_tool_handler(sql_file: str): """Factory function to create tool handlers""" def handler() -> List[Dict[str, Any]]: return db_manager.execute_query_sync(sql_file) return handler
- main.py:31-39 (registration)Registers handlers for all tools, including 'get_software_update_history', with the FastMCP server using dynamic decorator.# Register all tools from definitions for tool_def in TOOL_DEFINITIONS: tool_func = create_tool_handler(tool_def.sql_file) tool_func.__doc__ = tool_def.description tool_func.__name__ = tool_def.name # Register the tool with the MCP server mcp.tool()(tool_func)
- main_remote.py:118-127 (handler)Handler for remote HTTP server that executes the predefined tool's SQL query asynchronously by looking up its definition.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 )
- main_remote.py:179-186 (schema)Registers 'get_software_update_history' in the tools list with empty input schema (no parameters required).for tool_def in TOOL_DEFINITIONS: tools.append( types.Tool( name=tool_def.name, description=tool_def.description, inputSchema={"type": "object", "properties": {}}, ) )