Skip to main content
Glama
cobanov

teslamate-mcp

get_monthly_driving_summary

Retrieve monthly driving statistics for Tesla vehicles, including distance traveled, energy consumption, and associated costs.

Instructions

Get the monthly driving summary for each car. Provides monthly statistics for distance, energy usage, and costs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Generic asynchronous handler that resolves the tool by name from TOOL_DEFINITIONS and executes its associated SQL query using the DatabaseManager.
    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.py:22-28 (handler)
    Factory function that creates synchronous handler functions for each tool, executing the predefined SQL file 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
  • src/tools.py:77-81 (registration)
    Tool registration entry defining the name, description, and SQL file path for the get_monthly_driving_summary tool. Used by both main.py and main_remote.py for registration and execution.
    ToolDefinition(
        name="get_monthly_driving_summary",
        description="Get the monthly driving summary for each car. Provides monthly statistics for distance, energy usage, and costs.",
        sql_file="monthly_driving_summary.sql",
    ),
  • main.py:32-39 (registration)
    Loop that dynamically registers a handler for each tool defined in TOOL_DEFINITIONS using FastMCP for STDIO transport.
    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:178-181 (registration)
    Loop in list_tools() that registers the schema (empty input, description) for each predefined tool in the MCP server for HTTP transport.
    # Add all predefined tools
    for tool_def in TOOL_DEFINITIONS:
        tools.append(
            types.Tool(
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what data is provided (monthly statistics) but does not cover aspects like read-only nature, performance, error handling, or data freshness. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is concise and well-structured with two sentences: the first states the purpose, and the second elaborates on the statistics provided. Every sentence adds value without redundancy, making it front-loaded and efficient.

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 no parameters, an output schema exists, and no annotations, the description is minimally adequate. It explains what the tool returns (monthly statistics for distance, energy usage, costs) but lacks details on output structure or behavioral context. With an output schema, the description need not explain return values in depth, but it could benefit from more context on usage or limitations.

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 there are no parameters to document. The description does not need to add parameter semantics beyond the schema, and it appropriately focuses on the tool's output. A baseline score of 4 is applied as it handles the lack of parameters effectively.

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 monthly driving summary for each car' specifies the verb (get) and resource (monthly driving summary), and 'Provides monthly statistics for distance, energy usage, and costs' elaborates on the content. However, it does not explicitly differentiate from siblings like 'get_daily_driving_patterns' or 'get_total_distance_and_efficiency', which reduces clarity.

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 does not mention prerequisites, context, or exclusions, nor does it reference sibling tools for comparison. Usage is implied by the purpose but lacks explicit direction.

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