Skip to Content
AaviDocs

The Kiro power

A Kiro power with one local MCP server and two tools, so any Kiro agent can ask Aavi what a city's record says about a home's water line.

The Aavi power lets a Kiro user's agent ask Aavi for them. The power holds no data. It calls Aavi's live public API at https://aavi.vercel.app and hands the reply to the agent. The code is in packages/power and the spec is in .kiro/specs/kiro-power.

The two tools

ToolInputWhat it callsWhat it returns
lookup_addressaddress, one US street address of 1 to 100 characters. Optional confirm, up to 200 characters, the exact line the tool offered.POST /api/lookupThe utility's own record for one home: the class, the matched address, the source and link, the record count, the record date, and both sides of the line with the raw values. When the address could match more than one home, it asks for confirmation and you call it again with confirm. A non-answer comes back as its named state, with no class.
city_statscity, a city key such as detroit, or all.GET /api/cities, with ?source= set to the key when one is givenThe counts a city has published for its service line inventory in the four classes, the unknown share, the latest status, whether the counts are stale, the days of history, and the days the counts fell.

Both tools are marked read-only. Both reject any argument they do not list. See API for the routes.

A skill, skills/aavi-lookup/SKILL.md, tells the agent when to use each tool and how to word the answer. It also tells the agent that a record is not a water test, that unknown is the most common answer, and what to suggest next: read the utility's own lookup page, run EPA's coin and magnet check at the water meter, and ask the utility directly.

Data, not instructions

Aavi's API output becomes input for someone else's AI agent, so the power treats Aavi as the untrusted party.

  • Tool results are typed fields: the class from the fixed set, dates, the source name and link, and raw values capped in length and marked as quoted public-record text.
  • Every sentence the server writes is a fixed constant. None is built from a reply.
  • Every lookup result carries the line that the class reflects the utility's record and is not a water test.
  • Only checked https links come through.
  • The power talks only to its one fixed https address and never fetches any other URL.
  • The test suite scans the power's wording for words of reassurance.

Install

  1. Open the Powers panel in Kiro.
  2. Choose Add Custom Power.
  3. Choose Import power from a repository URL.
  4. Enter https://github.com/ramakrishnanhulk20/aavi/tree/main/packages/power.

The server is one committed file, dist/server.mjs, and runs with plain Node 22 or newer. Nothing else needs to be installed. The manifest is plugin.json and the server config is mcp.json.

Where your address goes

The address you give the agent is sent to aavi.vercel.app. That site asks the Census geocoder and the city's own server about it. Aavi keeps no address. See security and privacy.

The proof

docs/power-proof.md records two uses of the power, with the tool results copied word for word:

  1. An address lookup for a city-owned commercial building in Detroit, the project's chosen demo building. The first call asked for confirmation of the address. After the person confirmed, the second call returned the utility's record, with the source, the record date as "date not published", the whole-line value and both sides.
  2. A city stats call for Detroit, which returned the published counts for the four classes, the unknown share, the latest status and the days of history.

The transcript also shows the agent keeping to the wording rules: it says the record is not a water test, and points to the three next steps.

The tests

The package has its own tests, including property tests written with fast-check. They cover the request shapes, the Retry-After handling, the text caps, the wording scan, the privacy rules, the manifests and the bundled server. Run them with npm run power:test from the repository root, and rebuild the bundle with npm run power:build.