Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AIVY_API_KEYYesYour Aivy API key, created in the Aivy app under API keys. Use a read-only key for read access or a read-and-control key to allow changing energy mode and Ai+ settings.
AIVY_API_URLNoBase URL for the Aivy Developer API. Set this to point at another deployment.https://bridge.ivyenergy.com.au/v1

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Tools for the user's own solar + battery system through the Aivy platform (Ivy Energy, Australia). Call list_sites first; every other tool takes one of its site ids (vendor:station_id). Power is in watts (battery_w > 0 charging, grid_w > 0 exporting), SOC in percent, prices in Australian cents per kWh. Readings refresh about once a minute: do not poll faster. Changing the mode or Ai+ settings needs a control-scope key; a forced (manual) mode set here is time-boxed and the server returns the site to its previous mode when the time is up. Sites named sandbox:... are shared demo data: readable by every key; energy-mode and Ai+ changes on them are kept for the user's account only (demo: true, nothing reaches hardware), so they are the place to try writes. No site yet? list_vendors then connect_site links the user's own system. No key yet (tools answer 'No Aivy API key')? register_account + verify_registration creates an account and key from the chat; sign_in does the same for an existing account. Call get_agent_guide once at the start of a conversation: it is the playbook (which tools answer which questions, when to confirm, how to report) and takes precedence over guesses.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_registration_termsA

Whether sign-up is open and the terms of use / privacy policy a new account accepts (version, hash and a link). Show the link to the person and ask whether they accept BEFORE register_account. Hosts that support cards render a sign-up / sign-in form here instead: the person types email and password into the card, which calls register_account / verify_registration / sign_in itself, so nothing passes through the chat. When the card is shown, wait for the person to say they are done.

list_sitesA

Start here: the user's solar + battery sites across vendors, and whose API key this is.

sites: for each, id (vendor:station_id, used by every other tool), vendor, name, online and the vendor's headline power in W. account: who the key belongs to, its scope (read, or control = may change settings) and email_alerts (whether alert emails can reach the account's verified address).

Without a key it says so (has_key false): register_account (new) or sign_in (existing account) then sets one up from the chat.

get_statusA

What one site is doing now, and what it is.

Top level is the live reading: soc_pct, pv_w, load_w, grid_w (>0 exporting), battery_w (>0 charging), at, and source (vendor = fresh, stored = last kept reading). A null channel is one the vendor does not report, not zero. Refreshes about once a minute.

site holds the fixed facts: timezone, battery_capacity_kwh and its source, max_power_w, export_limit_w, soc_floor_pct (the floor Ai+ keeps), usable_kwh_now, the current energy_mode and time_slots, today's energy and income when reported. Take capacity and limits from here, never from an estimate.

A newly connected site may have no live reading yet: the facts still come back, with reading_error.

get_curveA

Power and SOC history of a site: 5-minute points for one local day, or daily values over the last 7 or 30 days. Returns times (UTC), local_times, and series per channel (pv, load, battery, grid, soc). Large: summarise before quoting. For the reading right now use get_status.

get_earningsA

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.

get_operationsA

What the platform did to the site and why, newest first: each automatic (Ai+) and manual command with its reason and the prices at the time. Use it to explain 'why did it charge at 3am'.

get_pricesA

Amber Electric prices for the site: the current interval and the forecast as import price and feed-in earn (c/kWh incl. GST), with a summary of cheapest/dearest periods. Fails with 409 when no Amber account is linked to the site.

list_vendorsA

Every inverter / battery brand Aivy can connect, whether it is available on this deployment, what connecting one needs (connect: serial + NMI, a system id, or an OAuth sign-in at the vendor) and how much of it can be controlled. Use before connect_site.

list_alertsA

Read the alerts on a site: the rules and what fired. Never creates or changes a rule.

rules: what each watches (soc %, import/export price c/kWh, forecast temperature °C), the threshold, whether it emails, when it last fired. events: the 20 most recent firings, newest first (rule, value, time, delivery). Answers "did anything happen overnight?".

To propose a NEW alert, pass it in the draft arguments (metric, operator and threshold at least). Nothing is saved: hosts with cards show the form filled in and the person's click on "Add alert" is their yes, so wait for them. Without a card, restate the rule and call create_alert once they agree.

create_alertA

Set up a threshold alert on a site: it fires when the watched metric crosses the threshold. Every firing goes to the app inbox (and the phone when the app is installed); email=True also mails the account's verified address (list_sites account.email_alerts says whether that works). An alert only tells the person something; it never changes what the battery does. Confirm the rule with the user before creating it (or let them add it from the list_alerts card). Returns the site's rules with the new one under created.

delete_alertA

Retire an alert rule (past firings stay in the inbox). Confirm with the user first. Returns the site's remaining rules with the removed id under deleted.

get_strategyB

Strategy mode on a site: the AI-written rules running now (name, rules, lease, last action, recent evaluations), status none when there has never been one, or ended with end_reason. limits is what the server enforces on every strategy.

start_strategyA

Preview or start a custom strategy: YOU write the rules from what the person wants. Two calls, the second needs the first.

  1. accept_risk=false (default): starts nothing; dry-runs the rules on the current readings and returns a proposal_id. A card host shows a Start button that makes call 2 itself, so wait; otherwise read the rules back and ask.

  2. accept_risk=true with that proposal_id and every other argument unchanged, only after the person said yes (control scope; demo sites dry-run). Refused without a matching proposal_id or after 15 minutes: preview again.

A strategy already running has its rules replaced by the same two calls.

end_strategyA

Stop the running strategy now; the site goes back to the mode it had before it started. Confirm with the person first unless they asked for it.

get_energy_modeA

How the site is run now and how Ai+ is configured.

Returns energy_mode (selfConsumption | amber_smart = Ai+ | au_* = the AU-01..04 student strategies | forced), time_slots (the forced windows), soc_floor_pct, the variant and settings in force, and reverts_at / reverts_to when a forced mode will hand back by itself.

ai_plus is the Ai+ configuration whether or not Ai+ is the mode: active, variant, variant_options, settings, and tunable (every lever with type, min, max, unit and default). Take ranges from it before changing Ai+ with set_energy_mode.

Hosts that support cards render a control card; a click on its buttons is the person's yes.

plan_dischargeA

Work out when and how hard to discharge. Calculates only: nothing is applied, a read key is enough.

goal='best_price' ("sell at the best prices tonight"): the best-paid Amber intervals between window_start and window_end for the energy above reserve_soc, optionally only above min_sell_c. Returns the intervals, expected revenue and the average it beats.

goal='target_soc' ("keep 30% for 9 pm"): one steady discharge from window_start (default now) that reaches target_soc at window_end; needs both of those; prices play no part. Returns power_w.

Both return proposed time_slots: apply with set_energy_mode(mode='forced', time_slots=...) after the user agrees. On hosts with cards the plan's Apply button is the user's yes.

register_accountA

Create an Aivy account from the chat, step 1 of 2: a verification code is emailed to email. Needs no API key. Ask the person to choose the password (8+ characters; it is also their Aivy app password); do not invent one. Then ask them for the code and call verify_registration. The reply looks the same whether or not the address already has an account: a code that never arrives means check spam or use sign_in instead.

verify_registrationA

Create an Aivy account from the chat, step 2 of 2: confirms the emailed code, accepts the terms (only pass accept_terms=true after the person said yes), creates the account and an API key, and stores that key on this computer (~/.aivy/credentials.json) so every other tool works from now on, in this and future sessions. Never repeat the key back; say it is saved and can be managed at https://bridge.ivyenergy.com.au/account.

sign_inA

Use an existing Aivy account from the chat: creates an API key with the account's username (or email) and password, stores it on this computer (~/.aivy/credentials.json) and uses it from now on. Needs no existing key. The password is used once and not stored; never repeat the key back.

get_agent_guideA

The Aivy agent playbook: which tools answer which questions, the rules for writes (confirm first, forced mode is time-boxed, never guess numbers, do not poll), the step-by-step workflows (status, diagnosis, prices, earnings, selling tonight, keeping a reserve, charging now, connecting a system, Ai+ tuning) and what each error code means. Read it once at the start of a conversation. When a newer aivy-mcp is released, a short update note follows the playbook.

connect_siteA

CHANGES THE ACCOUNT (control scope). Confirm with the user before calling.

Link the user's system to their Aivy account. Serial-number vendors (Sungrow and FoxESS need sn + nmi, Sigenergy needs system_id, most others sn) return connected site ids. OAuth vendors (AlphaESS, SolaX) return an authorize_url: give it to the user to open in a browser and approve; the site then appears in list_sites within a minute. Demo sites need no connecting.

disconnect_siteA

CHANGES THE ACCOUNT (control scope). Confirm with the user before calling.

Remove a site from the user's account. The vendor-side link and history are left alone; the account just stops seeing it. Demo sites cannot be removed.

set_energy_modeA

CHANGES THE SITE (control scope). Confirm with the user before calling.

Switch how the site is run (pass mode), or tune Ai+ without switching (omit mode, pass settings and/or variant). A rejected value changes nothing; rejected says why.

mode=forced is manual and time-boxed: the site returns to its previous mode when duration_minutes is up. Give action for one window starting now, or time_slots. Refused (409) while a strategy is running, or when an au_* mode cannot run on the site. Takes effect within about a minute; the SOC floor and export limits hold. On a demo site (sandbox:...) nothing reaches hardware.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
aivy-status-card
aivy-plan-card
aivy-prices-card
aivy-signup-card
aivy-control-card
aivy-connect-card
aivy-curve-card
aivy-earnings-card
aivy-operations-card
aivy-alerts-card
aivy-sites-card
aivy-strategy-card

TDQS

A3.9/5.0

Scored across 23 tools

Disambiguation4/5

Most tools target a distinct resource+action: status vs curve vs earnings vs prices vs operations are cleanly separated, and plan_discharge (read-only calculation) is explicitly contrasted with set_energy_mode (applies). Some boundaries blur — get_status already returns energy_mode/time_slots that get_energy_mode also covers, and the four auth tools (get_registration_terms, register_account, verify_registration, sign_in) require careful reading of the numbered steps to pick correctly.

Naming Consistency4/5

Strong verb_noun pattern throughout: get_*, list_*, create_*, delete_*, start_*/end_*, connect_site/disconnect_site, set_energy_mode, register_account/verify_registration. Minor deviations are sign_in (verb+preposition) and plan_discharge, but both are conventional enough not to confuse.

Tool Count3/5

23 tools sits at the heavy end of the range for a solar/battery control server. Several are defensible (alerts CRUD, strategy lifecycle), but get_agent_guide plus four separate auth/registration tools push it past what a typical session needs.

Completeness4/5

Covers the full lifecycle: onboarding (terms, register, verify, sign in), site connect/disconnect, monitoring (status, curve, earnings, operations, prices, vendors), alerts, strategy get/start/end, and energy-mode read/write with discharge planning. Minor gaps: no update_alert (must delete and recreate a rule) and no explicit site-removal of history or settings beyond Ai+ tuning.

Maintenance

ActivityNo data
ResponsivenessOutdated data