> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mireye.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP tools, resources, and prompts

> Mireye's MCP surface: two tools, catalog resources, and workflow prompts.

Mireye keeps the callable MCP tool list intentionally small:
`mireye_ask` and `mireye_fetch`. Catalog discovery is exposed as MCP
resources, and common workflows are exposed as prompts, so agents get better
context without paying for extra tool-choice clutter.

## Tools

> If the caller asked a **question**, use `mireye_ask`. If the caller named
> **fields** or a **preset**, use `mireye_fetch`.

Both tools are read-only and idempotent. Their schemas constrain latitude and
longitude to the supported US envelope and cap `fields` at 50 items.

### `mireye_ask`

Answers a natural-language question about a US coordinate with citations to
authoritative federal data sources.

```json theme={null}
{
  "tool": "mireye_ask",
  "arguments": {
    "lat": 40.7128,
    "lng": -74.0060,
    "question": "What is the elevation here?"
  }
}
```

Use this for questions like “is this in a flood zone?”, “what is the wildfire
risk?”, or “what kind of building is at this address?”.

### `mireye_fetch`

Fetches exact catalog fields or preset bundles with per-field provenance.

```json theme={null}
{
  "tool": "mireye_fetch",
  "arguments": {
    "lat": 29.7604,
    "lng": -95.3698,
    "preset": "flood_risk"
  }
}
```

Named fields and presets can be combined; Mireye unions and deduplicates the
resolved fields, then enforces the 50-field cap.

## Resources

Use resources for read-only catalog context instead of adding catalog tools:

| URI                            | Purpose                                                                  |
| ------------------------------ | ------------------------------------------------------------------------ |
| `mireye://catalog/fields`      | Full field catalog with descriptions, sources, hints, presets, and TTLs. |
| `mireye://catalog/presets`     | Preset names and their field expansions.                                 |
| `mireye://catalog/us-envelope` | Supported coordinate bounds.                                             |
| `mireye://field/{name}`        | One field definition, e.g. `mireye://field/elevation`.                   |
| `mireye://preset/{name}`       | One preset expansion, e.g. `mireye://preset/flood_risk`.                 |

The hosted MCP endpoint serves these from the same in-memory payload as
`GET /v1/meta/fields`. The local stdio adapter fetches that endpoint and
caches it for one hour with ETag support.

## Prompts

Prompts package common agent workflows while leaving the two tool names stable:

| Prompt                       | Use                                                      |
| ---------------------------- | -------------------------------------------------------- |
| `mireye_ask`                 | Nudge the agent to call `mireye_ask`.                    |
| `mireye_fetch`               | Nudge the agent to call `mireye_fetch`.                  |
| `mireye_site_report`         | Fetch `site_selection` and summarize a site.             |
| `mireye_flood_check`         | Fetch `flood_risk` and assess flood-relevant signals.    |
| `mireye_wildfire_underwrite` | Fetch `wildfire_underwrite` and assess wildfire signals. |
| `mireye_pick_fields`         | Read catalog resources and choose a minimal field set.   |

## Errors

MCP tool failures include actionable JSON fields such as `code`, `message`,
`http_status`, `request_id`, `tool`, and `retryable`. Agents should retry only
when `retryable` is true, refresh catalog context for `fields_unknown`, and ask
the user to authenticate for `mcp_auth_required`.

See [/api-reference/errors](/api-reference/errors) for the HTTP API error
catalog and [/api-reference/fetch](/api-reference/fetch) for preset semantics.
