Skip to main content
Glama
cobanov

teslamate-mcp

get_daily_driving_patterns

Analyze daily driving habits and patterns by weekday and time to understand vehicle usage trends.

Instructions

Get the daily driving patterns for each car. Shows driving habits and patterns by day of week and time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Tool schema definition specifying the name, description, and SQL file path for the get_daily_driving_patterns tool.
    ToolDefinition(
        name="get_daily_driving_patterns",
        description="Get the daily driving patterns for each car. Shows driving habits and patterns by day of week and time.",
        sql_file="daily_driving_patterns.sql",
    ),
  • main.py:22-28 (handler)
    Factory function that creates the handler for get_daily_driving_patterns (and other tools), which executes the SQL query from the specified 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
  • main.py:32-38 (registration)
    Dynamically registers the handler for get_daily_driving_patterns (and all tools) with the FastMCP server using the 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)
  • Async handler function for executing predefined tools like get_daily_driving_patterns in the remote HTTP MCP server.
    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 (registration)
    Registers the tool schema for get_daily_driving_patterns (and others) in the list_tools method for the remote MCP server.
    for tool_def in TOOL_DEFINITIONS:
        tools.append(
            types.Tool(
                name=tool_def.name,
                description=tool_def.description,
                inputSchema={"type": "object", "properties": {}},
            )
        )
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 the tool 'Get[s]' data, implying a read-only operation, but doesn't clarify aspects like authentication needs, rate limits, data freshness, or whether it aggregates historical data. The description adds minimal context beyond the basic purpose, missing key behavioral traits for a tool with no annotation support.

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 two concise sentences that efficiently convey the tool's purpose and output focus. The first sentence states the action and resource, and the second elaborates on the data's nature. There is no wasted language, and it is front-loaded with the core functionality.

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, the description is minimally adequate. It explains what the tool does and the type of data returned, but with no annotations and many sibling tools, it lacks guidance on usage and behavioral details. The output schema likely covers return values, so the description's focus on semantics is sufficient, but overall completeness is limited by the missing context for selection and operation.

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 input schema has 0 parameters with 100% description coverage, so no parameter documentation is needed. The description doesn't discuss parameters, which is appropriate given the schema's completeness. It adds value by explaining the output's focus on 'driving habits and patterns by day of week and time', which helps the agent understand the return data's structure beyond what the output schema might provide.

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 daily driving patterns for each car' specifies the verb (get) and resource (daily driving patterns for each car). It distinguishes from siblings by focusing on driving habits by day/time, unlike tools for charging, efficiency, or battery health. However, it doesn't explicitly differentiate from 'get_daily_battery_usage_patterns' or 'get_drive_summary_per_day', which might overlap in scope.

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 mentions 'driving habits and patterns by day of week and time' but doesn't specify use cases, prerequisites, or exclusions. With many sibling tools (e.g., 'get_daily_battery_usage_patterns', 'get_drive_summary_per_day'), the lack of explicit comparison leaves the agent guessing about the best choice.

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