Skip to main content
Glama

Connect a system

connect_site

Link a solar or battery system to a user's Aivy account by vendor and serial or system ID, returning connected site IDs or an OAuth authorization URL to approve access.

Instructions

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.

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": {
      "vendor": "<vendor>"
    },
    "name": "connect_site"
  }
}

Input Schema

NameRequiredDescriptionDefault
snNoDevice / inverter serial number, for serial-number vendors.
nmiNoNational Metering Identifier, from the electricity bill; Sungrow and FoxESS need it with sn.
regionNoAlphaESS portal region.AU
vendorYesVendor id from list_vendors, e.g. sungrow.
system_idNoSigenergy system id.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.11.5
    • addedInput schema / properties / nmi / description
      Added value: +"National Metering Identifier, from the electricity bill; Sungrow and FoxESS need it with sn."
    • addedInput schema / properties / region / description
      Added value: +"AlphaESS portal region."
    • addedInput schema / properties / region / enum
      Added value: +[
      +  "AU",
      +  "EU",
      +  "SG"
      +]
    • addedInput schema / properties / sn / description
      Added value: +"Device / inverter serial number, for serial-number vendors."
    • addedInput schema / properties / system_id / description
      Added value: +"Sigenergy system id."
    • addedInput schema / properties / vendor / description
      Added value: +"Vendor id from list_vendors, e.g. sungrow."
  2. First observedv0.9.0

TDQS

A4.7/5.0
Behavior4/5

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

Beyond the annotations it discloses that the call "CHANGES THE ACCOUNT (control scope)" and requires user confirmation, which is meaningful context given destructiveHint=false. It also describes the asynchronous OAuth outcome and the roughly one-minute propagation delay to list_sites. It stops short of covering edge cases such as re-connecting an already-connected site or how failures surface.

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

Conciseness5/5

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

The warning and confirmation requirement are front-loaded in the first sentence, followed by vendor-class mechanics and a final exclusion. Every sentence carries distinct information with no filler.

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

Completeness5/5

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

Given five parameters, a 100% schema coverage, an output schema, and full annotations, the description supplies everything else an agent needs: the vendor-conditional inputs, the two-step OAuth flow, the demo-site exclusion, and the confirmation gate. No material gap remains for correct invocation.

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?

With 100% schema coverage the baseline is 3, but the description adds conditional requirements the schema cannot express: Sungrow and FoxESS need sn plus nmi, Sigenergy needs system_id, most others only sn. This tells the agent which parameters matter for a given vendor even though the schema marks only vendor as required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "Link the user's system to their Aivy account," naming the Aivy account as the target. It is clearly distinguishable from siblings like list_sites and disconnect_site, and it further branches the operation by vendor type so an agent knows what the call actually does in each case.

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

Usage Guidelines5/5

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

Explicit when-to-use rules are given per vendor class (serial-number vs OAuth) plus an explicit when-not: "Demo sites need no connecting." It also states the prerequisite action of confirming with the user before calling, and the OAuth path tells the agent what to do next (hand the URL to the user, then the site appears in list_sites).

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