roofgeometry-prospect turns Solar API roof segments into an installer packet and sketch
An MCP server that packages Google Solar API roof segments into pitch, facing, usable area, a steep-roof flag and an SVG sketch. Our keyless run covers 7 synthetic buildings; no real Solar response yet.
By David Discua
Measured in the lab
- 7
- synthetic scenarios
- 7/7
- MCP output equal to service output
- 18.43°
- default steep threshold
- Steep flag turns off when the threshold is raised to 35°
- Rejected pre-GA request retried once without it
- Flat roof returns NOT_FOUND at HIGH quality and answers at MEDIUM
- A call budget of 3 stops the second address lookup
- Polygon footprint round trip within 0% on the synthetic hip roof
From reports/roofgeometry-prospect.json · run on October 21, 2026. synthetic fixtures only (invented buildings in the documented response shape); real MCP server through an MCP client; no network, no keys
How it is wired
01/03A sales agent asks about one address.
The Google Solar API's buildingInsights:findClosest returns a building's roof segments with pitch, azimuth, area, height and sunshine quantiles, as raw numbers an agent has to interpret. roofgeometry-prospect is an MCP server and CLI that turns them into a one-page installer packet: pitch in degrees and rise over 12, facing, usable south and west area, a steep-roof flag, a complexity score, a shading proxy and an SVG roof sketch. Our keyless run sent 7 synthetic buildings through the real MCP server and checked that its output matched the service layer every time. The catch is that the live Solar path was not run in this lab, so no real Solar response has been seen.
The catch
Every number below comes from invented buildings drawn in the documented response shape. Real responses may differ in fields, value formats or polygon semantics. Geocoding v4 answered live. The opt-in pre-GA roof geometry option is less certain still. It appears in the Solar API discovery document (revision 20261019) as experiments=ROOF_GEOMETRY_INSIGHTS with additionalInsights=ROOF_GEOMETRY, adding facet polygons and rooftop obstacles. The HTML reference does not list it, and a March 2026 copy of the discovery document has neither value. Google's pre-GA terms carry no SLA, so treat it as test-only.
The steep flag uses the OSHA steep-roof slope (more than 4 in 12, which is 18.43°) as a planning signal and says nothing about whether a roof is safe to work. The shading proxy comes from the sunshine quantiles, so it cannot tell tree shade from a roof facing the wrong way.
What we ran (keyless)
bun install --frozen-lockfile
bun run src/cli.ts roof --address "100 Example Ave, Sampletown" --fixtures
bun run src/cli.ts roof --address "100 Example Ave, Sampletown" --roof-geometry --svg roof.svg --fixtures
bun run report
From reports/roofgeometry-prospect.json, run on October 21, 2026 on synthetic fixtures:
| Scenario | Segments | Prime m² | Usable m² | Steep | Max pitch | Complexity | Shaded share |
|---|---|---|---|---|---|---|---|
| Hip roof | 6 | 90.6 | 124.6 | yes | 26.8 | complex (6) | 55% |
| Hip roof, pre-GA geometry | 6 | 90.6 | 124.6 | yes | 26.8 | complex (8) | 55% |
| Hip roof, steep at 35° | 6 | 90.6 | 124.6 | no | 26.8 | complex (6) | 55% |
| Steep cut-up roof | 9 | 105.8 | 95.4 | yes | 50.0 | very-complex (9) | 71% |
| Southern hemisphere gable | 3 | 76.8 | 76.8 | yes | 22.0 | moderate (3) | 59% |
| Flat commercial, MEDIUM | 2 | 0.0 | 480.1 | no | 1.1 | simple (2) | 7% |
| Pre-GA rejected, GA fallback | 2 | 46.2 | 46.2 | yes | 30.0 | simple (2) | 54% |
The pre-GA row adds 2 synthetic obstacles, which raises the complexity score from 6 to 8. The error paths behaved as designed: a flat roof at the default HIGH quality returned google_NOT_FOUND and answered at MEDIUM, a rejected pre-GA request with fallback off returned google_INVALID_ARGUMENT, and a budget of 3 calls allowed one address lookup and refused the second. The 0% polygon footprint difference only shows our own projection code round-trips, since the fixture uses the same projection.
How it is wired
The roof_geometry tool geocodes an address with Geocoding v4 if needed, makes one findClosest call (two if a pre-GA request is rejected and retried), and builds the packet. Prime means non-flat and facing within 90° of 225° north of the equator, or of 315° south of it. Usable means prime or flat with room for at least 4 panels. Every threshold carries its source in the output, and nothing is cached between calls.
Minilab (open source)
roofgeometry-prospect wraps the Google Solar and Geocoding APIs, so there is no upstream repo to star. Run the keyless commands above, then add a Google Maps Platform key with the Solar API enabled to .env and run bun test tests/live to see whether real responses match the fixtures.
Run it yourself
SkilledDragonCorp/roofgeometry-prospect
Clone, install and run the report with no API keys. The numbers above are what that run writes.
bun install --frozen-lockfile && bun run src/cli.ts roof --address "100 Example Ave, Sampletown" --fixturesSkilledDragon is not affiliated with Google LLC or OSHA. Every number here comes from synthetic buildings, not real roofs. Not a site survey or safety assessment. Marks belong to their owners.
All labs