Skip to main content
Glama
linkcd
by linkcd

get_consumption_data

Retrieve hourly energy consumption data for the past 30 days, including time periods, total costs, base energy costs, and consumed kWh from Tibber power supplier.

Instructions

Get the hourly consumption data for the last 30 days, such as time period, total cost, base energy cost, and consumpted kwh.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:49-72 (handler)
    The main handler function for the 'get_consumption_data' tool. It is decorated with @mcp.tool() which registers it in the FastMCP server. The function connects to the Tibber API, fetches homes, retrieves hourly consumption data, and returns it as a string.
    @mcp.tool()
    async def get_consumption_data() -> str:
        """Get the hourly consumption data for the last 30 days, such as time period, total cost, base energy cost, and consumpted kwh.
        """
        try:
            tibber_connection = tibber.Tibber(tibber_api_token, user_agent="tibber-mcp")
            await tibber_connection.update_info()
            
            homes = tibber_connection.get_homes()
            if not homes:
                logger.error("No homes found for this Tibber account")
                return "No homes found"
            
            home = homes[0]
            await home.fetch_consumption_data()
    
            await tibber_connection.close_connection()
    
            result = home.hourly_consumption_data
            return str(result)
        
        except Exception as e:
            logger.error(f"Error retrieving price info: {e}")
            return f"Error: {str(e)}"
  • server.py:49-49 (registration)
    The @mcp.tool() decorator registers the get_consumption_data function as a tool in the MCP server.
    @mcp.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 describes the data returned but doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication needs, error conditions, or response format. For a data retrieval tool with zero annotation coverage, 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 a single, efficient sentence that front-loads the key action and scope. It lists data fields concisely without redundancy. However, it could be slightly more structured by separating the action from the data details, but overall it's appropriately sized with minimal waste.

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

Completeness2/5

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

Given the tool's complexity (data retrieval with no parameters) and lack of annotations and output schema, the description is incomplete. It covers what data is fetched but omits behavioral traits, usage context, and output details. For a tool with no structured support, the description should provide more comprehensive guidance to aid the agent effectively.

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% coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter details, as there are none to explain. It implies the tool operates without user-provided parameters, which aligns with the schema. Baseline is 4 for zero parameters, as the description doesn't contradict or add unnecessary info.

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 action ('Get') and resource ('hourly consumption data'), specifying the time range ('last 30 days') and data fields (e.g., time period, total cost). It distinguishes from the sibling tool 'get_price_and_home_info' by focusing on consumption rather than price/home info, though it doesn't explicitly name the sibling. The purpose is specific but lacks explicit sibling differentiation.

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, such as the sibling tool 'get_price_and_home_info'. It mentions the data scope but doesn't explain use cases, prerequisites, or exclusions. This leaves the agent without clear context for tool selection.

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/linkcd/tibber-mcp'

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