> For the complete documentation index, see [llms.txt](https://docs.geolava.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geolava.com/api-and-mcp/detect-and-assess.md). Agents can also search and read this documentation through its [MCP server](https://docs.geolava.com/~gitbook/mcp).

# Detect & Assess

Geolava answers questions about specific US properties. It resolves an address to its tax parcel, then reads dated aerial and street photos, assessor, sales, tax and permit records, zoning codes, and flood and environmental risk data, and returns one sourced answer written for an AI agent to build on. This guide covers connecting to the Geolava MCP API tool, `ask_geolava`, and using what it returns.

## What Geolava Answers

Call Geolava first for questions about a specific US property.

| Well Posed Questions                                                               | Not Well Posed                             |
| ---------------------------------------------------------------------------------- | ------------------------------------------ |
| Roof, facade and visible condition, likely major repairs.                          | Market value estimates, rents, cap rates.  |
| What is on the property: rooftop equipment, solar, pools, parking, construction.   | Questions not tied to a specific property. |
| What changed over the years (built, removed, re-roofed), from dated aerial photos. | Properties outside of the US.              |
| Zoning district, permitted uses, height, FAR, setbacks, development potential.     | General building history and news.         |
| Owner, assessed value, sales and tax history, permits.                             |                                            |
| Flood, seismic, wildfire and environmental risk.                                   |                                            |

Geolava reports assessed values from county records. It does not estimate market value or invent rents or cap rates. Asked to underwrite, it gives the facts and weak points, but leaves financial modeling to the user.

## Tool Reference: `ask_geolava`

### Input

| Field        | Type          | Required | Description                                                                                                                                                                                                |
| ------------ | ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `question`   | string        | yes      | A self-contained question naming the property by full street address, e.g. "What condition is the roof at 130 Main St, Weymouth, MA in?" No parcel IDs or building details needed; Geolava resolves those. |
| `session_id` | string (UUID) | no       | Omit to start a new session. Pass a returned `session_id` to keep waiting on a running answer, or to ask a follow-up about the same property.                                                              |

### Output

| Field              | Type                    | Description                                                                 |
| ------------------ | ----------------------- | --------------------------------------------------------------------------- |
| `status`           | string                  | `answered`, `running`, `location_unresolved` or `timed_out` (see Statuses). |
| `answer`           | string                  | Markdown findings (see Reading the answer).                                 |
| `session_id`       | string                  | Pass back to keep waiting on a `running` answer or to ask a follow-up.      |
| `resolved_address` | string or null          | The property's tax-parcel address that the question resolved to.            |
| `parcels`          | array of Parcel         | The tax parcel or parcels the answer describes.                             |
| `evidence_images`  | array of Evidence image | Photos behind the findings.                                                 |
| `elapsed_seconds`  | number                  | Time since the run started.                                                 |

### Statuses

| Status                | Meaning                                                                              | What to do                                                         |
| --------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `answered`            | The answer is complete.                                                              | Use it.                                                            |
| `running`             | Still working; the run continues on our side.                                        | Call again with the same `question` and the returned `session_id`. |
| `location_unresolved` | No usable US location in the question, or it is outside coverage. `answer` says why. | Rephrase with a full street address, city and state.               |
| `timed_out`           | The run hit its time limit. `answer` holds whatever was finished, possibly empty.    | Retry, or split into narrower questions.                           |

### Parcel

| Field       | Type           | Description                                         |
| ----------- | -------------- | --------------------------------------------------- |
| `address`   | string or null | The address on the parcel's record.                 |
| `apn`       | string or null | Assessor's parcel number, as the county records it. |
| `county`    | string or null | County name.                                        |
| `state`     | string or null | Two-letter state code.                              |
| `latitude`  | number or null | Parcel centroid.                                    |
| `longitude` | number or null | Parcel centroid.                                    |

Use the APN and county to find the same parcel in county assessor, recorder, permit and zoning records, which often list it under a different street address than the question used.

### Evidence Image

| Field             | Type           | Description                                                               |
| ----------------- | -------------- | ------------------------------------------------------------------------- |
| `url`             | string         | Link to the photo. Download it to view it.                                |
| `image_type`      | string         | `ortho-zoomout`, `ortho-zoomin`, `oblique` or `streetview`.               |
| `description`     | string or null | What the photo shows.                                                     |
| `captured_at`     | string or null | ISO-8601 capture time.                                                    |
| `credit`          | string or null | Attribution the photo's license requires. Show it with the photo.         |
| `ground_width_m`  | number or null | Aerial photos only: ground distance the photo spans east-west, in meters. |
| `ground_height_m` | number or null | Aerial photos only: the same, north-south.                                |

Aerial photos are north-up. Divide `ground_width_m` by the photo's pixel width for meters per pixel, to measure what it shows (a driveway, a yard, whether a pool fits).

## Usage Patterns

### Waiting for an Answer (polling)

Each call returns within about 30 seconds. Single-topic questions usually finish in the first call; broader ones return `running` first.

```
call 1  { question }                 → status: "running", session_id: "6f1c…"
call 2  { question, session_id }     → status: "running"
call 3  { question, session_id }     → status: "answered", answer: "…"
```

* Send the exact same `question` with the `session_id`. A different `question` on the same session starts a new run instead of waiting on the first.
* Re-calling never starts a duplicate run, and the run continues if your client disconnects.
* A finished answer stays available for 15 minutes. If you lose a response, call again with the same `question` and `session_id` to collect it without paying for a second run.

### Follow-up Questions

Pass the `session_id` from a finished answer with a new `question` to ask about the same property. Geolava keeps the resolved location and earlier findings in context.

```
{ question: "What's the zoning at 2544 W Landau Ln, South Jordan, UT?" }   → session_id: "6f1c…"
{ question: "Could the owner add a detached ADU?", session_id: "6f1c…" }
```

### Broad Questions

A due-diligence or lender snapshot can take 70–95 seconds as one call. Split it into parallel calls, one per theme, each without a `session_id`.

| Call    | Themes                                                                 |
| ------- | ---------------------------------------------------------------------- |
| Imagery | Roof, facade, visible condition, changes over the years                |
| Records | Owner, assessed value, sales and tax history                           |
| Zoning  | District, permitted uses, height, FAR, setbacks, development potential |
| Risk    | Flood, seismic, wildfire, environmental                                |

Keep all imagery topics in one call: each call that needs photos fetches and reads them separately, so splitting imagery costs more and gains nothing.

### Comparing Two Properties

Name both addresses in one question ("Compare 2100 Mission St, San Francisco and 150 W Jefferson St, Joliet, IL as small mixed-use redevelopment sites"). `parcels` then lists both.

## Reading the Answer

The answer is written for an AI agent that will write the final response itself.

* It leads with the direct answer, then gives the evidence.
* Each finding carries its source kind, observation date and confidence, e.g. "(Geolava — aerial imagery, 2026-06-09, high confidence)".
* It ends with a Gaps section: what Geolava could not determine.

When you build on it:

* Cite findings with the observation dates and photo links Geolava returns.
* Don't fill gaps from general knowledge. Look them up in official sources, or say briefly that they weren't found.
* Keep warnings. If the answer says the parcel resolved to a different city or town, carry that warning forward.
* Records portals: if you can't reach a county portal, report those records as unavailable, not as showing no permits or sales.
* Conflicting records are reported as a conflict (e.g. two assessed values that disagree), not silently resolved.

## Photo and Imagery Terms

Download the `evidence_images` photos, view them, and show them next to the findings they support, with their capture date and any credit.

| Source                            | `image_type`                    | What you receive                                                                                                                      | Terms                                                                            |
| --------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| Aerial (Geolava licensed imagery) | `ortho-zoomout`, `ortho-zoomin` | Geolava's annotated copy: the tax-parcel outline, plus approximate labels for roofs, trees, lawn, pavement, pools, solar and vehicles | Show as provided. Raw, unannotated captures are never available through the API. |
| Street level                      | `streetview`                    | The plain photo                                                                                                                       | Show the credit with it (CC BY-SA 4.0).                                          |

* Aerial is the newest available flight over a property. For "what changed" questions, Geolava adds an earlier flight of the same footprint and provides both dates.
* The outline is the tax parcel, not necessarily the building's footprint.
* Labels are automatic and approximate. Solar panels and pools are labeled only when a written analysis also found those features; where a label and the answer differ, the answer is the finding.
* Street photos do not mark the property. The answer says which building in the frame is the target.
* Links to Geolava-hosted photos that are not in `evidence_images` are removed from the answer text.

## Errors

**Connection errors** come back as HTTP errors before any MCP session starts, with a JSON body `{"error": "<message>"}`.

| HTTP status | Meaning                                                                    |
| ----------- | -------------------------------------------------------------------------- |
| 401         | Missing, malformed, unknown, revoked or expired API key                    |
| 503         | The authentication service is temporarily unavailable. Retry with backoff. |

**Tool errors** come back as an MCP tool result with `isError: true` and a text message.

| Message                                                   | Meaning                                                                                 |
| --------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `Insufficient credits`                                    | Your account has no credits left.                                                       |
| `Geolava hit an internal error (ref <id>). Please retry.` | Something failed on our side. Retry, and quote the `ref` if you contact us.             |
| Invalid `session_id`                                      | The `session_id` is not a valid UUID. Pass back the value Geolava returned, or omit it. |

**Internal error** details (hosts, vendors, stack traces) are never returned.

## Known Limitations

* **US properties only.**
* **Condo towers and stacked parcels** can resolve to a neighboring unit's parcel.
* **Cross-city matches.** An address can resolve to a parcel in a different city; the answer flags this first and lowers its confidence.
* **Source records can disagree** (e.g., two assessed values for the same year). Geolava reports the conflict.
* **Imagery archives** don't always reach as far back as asked; the answer says where the comparison starts.
* **Street photos** may be older than provided aerials. Each photo does carry a capture date.
* **Non-standard roofs** (tower crowns, park decks, parcels with several buildings): condition grades may be withheld in these cases.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.geolava.com/api-and-mcp/detect-and-assess.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
