# Recovr MCP — Top-level reference

This server bundles multiple data **providers**, each contributing its
own tools, resources, and prompts. Both cover the same customer, but
they read **different stores at different grains**, so picking the wrong
one does not raise an error -- it returns a plausible answer computed
from the wrong source.

## Which provider answers which question

| Provider | Data source | Grain | Answers |
|---|---|---|---|
| `firestore` | Firestore, under `customers/{your_id}/` | one document per claim / run / ticket | Per-claim facts: a claim's documents, its edit history, eligibility, Optum tickets, agent runs. |
| `bigquery` | The PayPredict KPI mart in BigQuery, dataset `{your_id}_kpi` | pre-aggregated rows by day, payer, denial reason, CPT, specialty | Aggregated metrics: how many, how much, what rate, which ranked highest, how it trended. Read-only. |

Rules of thumb:

- A question about **one claim** -- by ACN, by ticket, by run -- is
  `firestore`. Never reconstruct claim-level state from the mart.
- A question with **how many / how much / what rate / top N / over time**
  is `bigquery`. Never count by walking Firestore documents: it is slow
  and it disagrees with the mart, which is the reported number.
- The two compose through the ACN, which appears in both. Find a metric
  in `bigquery`, then pull that claim's operational record from
  `firestore`.

To learn what's available in each, read its help blurb:

- `recovr://firestore/help` — customer-scoped Firestore access. Read
  family: `firestore_get`, `firestore_exists`, `firestore_list`,
  `firestore_query`, `firestore_count`, `firestore_paginate`,
  `firestore_list_collections`.
- `recovr://bigquery/help` -- customer-scoped KPI metrics.
  `bigquery_tables`, `bigquery_columns`, `bigquery_query`,
  `bigquery_fetch`. No SQL parameter: you describe the shape of the
  answer and the server compiles it.

## What you can reach

Everything under your customer, which your API key decides, plus the
payer contact records every customer shares (`payers/{stediId}`). No path
reaches another customer. No tool writes or deletes.

## Guides and schemas

On a host that does not surface MCP resources, pass any URI below to the
`read_guide` tool; it returns the same text.

- `recovr://firestore/help`, `recovr://bigquery/help` — provider help.
- `recovr://firestore/guides/paths` — which collection holds what.
- `recovr://firestore/guides/read` — tool semantics.
- `recovr://firestore/schemas/index` — document schemas, such as
  `recovr://firestore/schemas/agent_run`.
- `recovr://bigquery/guides/query` — how to build a query.
- `recovr://bigquery/guides/semantics` — metric meanings and table rulings.

## Always-available
- `recovr://customer/info` — your authenticated identity (the
  `customer_info` tool returns the same).
- `getting_started` prompt — orientation pointing at provider helps.

Reusable workflow templates ("skills") are returned by the `list_skills`
and `read_skill` tools and exposed under `skill://...` URIs — see
`skill://analyze-claim-edits/SKILL.md`.
