Skip to main content
Glama

Day earnings

get_earnings
Read-onlyIdempotent

Calculate bought, sold, and self-consumed energy on a site for a day or time window at Amber half-hourly prices when linked. Results are vendor-sample estimates, not bills; check coverage if partial.

Instructions

Energy bought, sold and self-consumed on one day, or in part of it, priced at the actual Amber half-hourly prices when Amber is linked. An estimate from vendor power samples, not the bill; read coverage and say so when it is partial.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_id": "<site_id>"
    },
    "name": "get_earnings"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoYYYY-MM-DD, 'today' or 'yesterday'. Omitted = today.
site_idYesSite id from list_sites: vendor:station_id, e.g. sungrow:1445844.
window_endNoHH:MM site local: where that part of the day ends.
window_startNoHH:MM site local. With window_end: account for that part of the day only.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.11.5
    • addedInput schema / properties / date / description
      Added value: +"YYYY-MM-DD, 'today' or 'yesterday'. Omitted = today."
    • addedInput schema / properties / site_id / description
      Added value: +"Site id from list_sites: vendor:station_id, e.g. sungrow:1445844."
    • addedInput schema / properties / window_end / description
      Added value: +"HH:MM site local: where that part of the day ends."
    • addedInput schema / properties / window_start / description
      Added value: +"HH:MM site local. With window_end: account for that part of the day only."
  2. First observedv0.9.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the bar is lower. The description still adds real context beyond them: results are an estimate from vendor power samples rather than the bill, and the `coverage` field may indicate partial data that the agent should disclose.

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?

Two tight sentences with no filler, and the core scope is front-loaded before the caveat. The caveat sentence is dense but every clause (estimate, not the bill, coverage) carries information.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and the description still flags the one output field (`coverage`) that changes how results should be reported. For a read-only, four-parameter tool this is close to complete, with only sibling routing left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents date, site_id, window_start and window_end. The description only echoes the day/partial-day concept that maps to the window parameters, adding no format or edge-case detail beyond the 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?

States a specific resource and scope: energy bought, sold and self-consumed for a day or part of a day, priced at Amber half-hourly rates. It is clear what the tool returns, though it never names a sibling (e.g. get_prices or get_curve) to distinguish itself from adjacent pricing/energy tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the description of what it computes, and it gives one useful instruction ('read `coverage` and say so when it is partial'). It does not say when to prefer this over get_prices or get_curve, nor any prerequisites such as linking Amber.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.