Skip to main content
Glama

get_price_and_home_info

Retrieves current, hourly, and tomorrow's price details, including price breakdowns and levels, along with home address info and timezone. All prices are in the specified currency.

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. Decorated with @mcp.tool() for registration. Connects to Tibber API using the provided token, retrieves home information and price data (current, today, tomorrow), and returns it as a string. Includes error handling.
    @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)}"

Other Tools

Related 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