Skip to main content
Glama
michaelkrasa

Alpha ESS MCP Server

by michaelkrasa

get_alpha_ess_data

Retrieve statistical energy data for all registered Alpha ESS solar and battery systems to monitor performance and analyze consumption patterns.

Instructions

Get statistical energy data for all registered Alpha ESS systems.

Returns:
    dict: Energy data with success status and system information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:359-403 (handler)
    The primary handler function for the 'get_alpha_ess_data' tool. Decorated with @mcp.tool() for automatic registration in FastMCP. Fetches statistical energy data from Alpha ESS API for all registered systems using the alphaess client.getdata() method. Includes error handling for authentication, API calls, and proper client cleanup.
    @mcp.tool()
    async def get_alpha_ess_data() -> dict[str, Any]:
        """
        Get statistical energy data for all registered Alpha ESS systems.
        
        Returns:
            dict: Energy data with success status and system information
        """
        client = None
        try:
            app_id, app_secret = get_alpha_credentials()
            client = alphaess(app_id, app_secret)
    
            # Get energy data
            data = await client.getdata()
    
            if data is not None:
                return {
                    "success": True,
                    "message": "Successfully retrieved Alpha ESS energy data",
                    "data": data
                }
            else:
                return {
                    "success": False,
                    "message": "Failed to retrieve energy data - API returned None",
                    "data": None
                }
    
        except ValueError as e:
            return {
                "success": False,
                "message": f"Configuration error: {str(e)}",
                "data": None
            }
        except Exception as e:
            return {
                "success": False,
                "message": f"Error retrieving energy data: {str(e)}",
                "data": None
            }
        finally:
            if client:
                await client.close()
  • Supporting helper function used by get_alpha_ess_data to retrieve Alpha ESS API credentials from environment variables and validate their presence.
    def get_alpha_credentials():
        """Get Alpha ESS credentials from environment variables"""
        app_id = os.getenv('ALPHA_ESS_APP_ID')
        app_secret = os.getenv('ALPHA_ESS_APP_SECRET')
    
        if not app_id or not app_secret:
            raise ValueError("ALPHA_ESS_APP_ID and ALPHA_ESS_APP_SECRET environment variables must be set")
    
        return app_id, app_secret
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 returns energy data with success status and system information, which is helpful, but lacks details on authentication requirements, rate limits, error handling, or data freshness. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.

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 concise and front-loaded, with the main purpose stated clearly in the first sentence. The second sentence adds value by describing the return format. Both sentences earn their place, and there's no unnecessary repetition or fluff, making it efficient for an agent to parse.

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 annotations are absent, the description is moderately complete. It explains what data is retrieved and the return structure, but it lacks context on authentication needs (implied by sibling 'authenticate_alphaess') and doesn't differentiate from similar tools. For a tool with no inputs and an output schema, this is adequate but could be more comprehensive.

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 the schema fully documents the absence of inputs. The description doesn't need to add parameter semantics, and it appropriately avoids discussing inputs. This meets the baseline for tools with no parameters, as there's nothing to compensate for.

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 statistical energy data for all registered Alpha ESS systems.' It specifies the verb ('Get'), resource ('statistical energy data'), and scope ('all registered Alpha ESS systems'), making it easy to understand what the tool does. However, it doesn't explicitly distinguish this tool from siblings like 'get_ess_list' or 'get_last_power_data', which might also retrieve system-related 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. It doesn't mention prerequisites (e.g., authentication via 'authenticate_alphaess'), exclusions, or comparisons to siblings like 'get_one_date_energy_data' or 'get_one_day_power_data'. Without such context, an agent might struggle to select the right tool for specific scenarios.

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/michaelkrasa/alpha-ess-mcp-server'

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