Skip to main content
Glama
cobanov

teslamate-mcp

get_basic_car_information

Retrieve basic vehicle details like VIN, model, and firmware version from your TeslaMate database for Tesla car information access.

Instructions

Get the basic car information for each car. Returns VIN, model, firmware version, and other vehicle details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:22-28 (handler)
    Factory function that creates the anonymous handler for the tool, which executes the SQL query from the tool's sql_file using the database manager.
    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
  • ToolDefinition dataclass instance defining the tool's name, description, and associated SQL query file.
    ToolDefinition(
        name="get_basic_car_information",
        description="Get the basic car information for each car. Returns VIN, model, firmware version, and other vehicle details.",
        sql_file="basic_car_information.sql",
    ),
  • main.py:32-38 (registration)
    Loop that dynamically creates and registers the handler for each tool, including 'get_basic_car_information', with the FastMCP server using mcp.tool() decorator.
    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)
  • DatabaseManager method that loads the SQL from the file and executes it synchronously, returning results as list of dicts. This is called by the tool handler.
    def execute_query_sync(self, sql_file_path: str) -> List[Dict[str, Any]]:
        """Execute SQL query synchronously"""
        sql_query = self.read_sql_file(sql_file_path)
        with psycopg.connect(self.connection_string, row_factory=dict_row) as conn:
            with conn.cursor() as cur:
                cur.execute(sql_query)
                return cur.fetchall()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions the return fields (VIN, model, firmware version, and other vehicle details) but lacks behavioral context such as whether this is a read-only operation, if it requires authentication, rate limits, or how data is sourced (e.g., from a database vs. live API). For a tool with no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, stating the purpose and return values in two clear sentences without unnecessary details. However, it could be slightly more structured by explicitly separating purpose from output, but it's efficient and earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters, 100% schema coverage, and an output schema exists (so return values needn't be explained), the description is minimally complete. It covers purpose and hints at output but lacks behavioral context (e.g., read-only nature, data freshness), which is a gap for a tool with no annotations. It's adequate but not fully comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, which is appropriate, but it could have noted the lack of inputs more explicitly. Baseline for 0 params is 4, as it adequately handles the absence of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the basic car information for each car' specifies the verb ('Get') and resource ('basic car information'), and it distinguishes from siblings by focusing on static vehicle details rather than dynamic metrics like status, charging, or driving patterns. However, it doesn't explicitly contrast with all siblings (e.g., 'get_current_car_status' might overlap in some details), keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., for initial setup vs. ongoing monitoring), or compare to siblings like 'get_current_car_status' for real-time data, leaving the agent to infer usage based on purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cobanov/teslamate-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server