Skip to main content
Glama

get_price_and_home_info

Retrieve current and forecasted hourly electricity prices with detailed breakdowns, price levels, and associated home information including address and timezone for energy management decisions.

Instructions

Get the infomation of: 1. current price, with price break down, price level, and currency 2. hourly price and price level of today 3. hourly price and price level of tomorrow 4. home address info, timezone etc the currency is applying to all prices

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:20-47 (handler)
    The handler function for the 'get_price_and_home_info' tool. It is registered via the @mcp.tool() decorator. Fetches Tibber API connection, updates info, retrieves home data including current and hourly prices for today/tomorrow, and home details, returning as string. Handles errors gracefully.
    @mcp.tool()
    async def get_price_and_home_info() -> str:
        """Get the infomation of:
            1. current price, with price break down, price level, and currency
            2. hourly price and price level of today
            3. hourly price and price level of tomorrow
            4. home address info, timezone etc
        the currency is applying to all prices
        """
        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.update_info_and_price_info() #using predefined query UPDATE_INFO_PRICE for getting most of info such as current price, today and tomorrow price, home info and subscription etc
            result = home.info 
    
            await tibber_connection.close_connection()
            return str(result)
        
        except Exception as e:
            logger.error(f"Error retrieving price info: {e}")
            return f"Error: {str(e)}"
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 retrieves information (implying a read-only operation) and mentions currency applies to all prices, but lacks details on permissions, rate limits, data freshness, or response format. For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

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

Conciseness3/5

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

The description is structured as a bulleted list, which is clear but slightly verbose. It front-loads the key action ('Get the information of:') but includes minor grammatical issues ('infomation'). Each bullet earns its place by specifying data categories, though it could be more streamlined (e.g., combining related points).

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, no annotations, and no output schema, the description adequately covers what data is returned. However, it lacks context on how the data is structured, any limitations (e.g., time ranges for hourly data), or error conditions. For a tool with rich output implied by the description, more completeness would help the agent use it 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 no parameter documentation is needed. The description adds value by clarifying the scope of returned data (e.g., price breakdown, hourly forecasts, address info) and noting currency consistency, which helps the agent interpret the output. This compensates well for the lack of an output schema.

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 retrieves specific information categories: current price details, hourly prices for today and tomorrow, and home address/timezone data. It uses the verb 'Get' with the resource 'information' and lists concrete data elements, making the purpose unambiguous. However, it doesn't explicitly differentiate from the sibling tool 'get_consumption_data', which appears related but focuses on different data.

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 like 'get_consumption_data'. It lists what data is returned but doesn't specify use cases, prerequisites, or exclusions. Without any context on when this tool is appropriate, the agent must infer usage from the data types 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/punkpeye/tibber-mcp'

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