Tools
Firestore values come back as plain JSON: integers and doubles as numbers, timestamps as ISO strings, maps and arrays as objects and lists, references as
{"reference": "users/alice"}, geopoints as {"latitude", "longitude"} and bytes as base64.
Safety
- No write tools. Firestore has no read-only session that the connector could turn on the way a SQL database does, so Danube simply has no code path that writes: the connector only calls the
get,runQuery,listCollectionIdsandaccounts:lookupendpoints. The service account’s roles are the second guarantee, and Test Connection warns when the account can write. - Auth users without secrets. Look Up Auth User returns only the fields listed above. Password hashes, salts, tokens, MFA details and custom claims are never returned.
- The key signs locally. The private key signs a short-lived request that Google exchanges for a one-hour access token, cached in memory until a minute before it expires. The token endpoint is fixed to Google’s, whatever the key file says.
- Limits on every call. 15 s timeout by default (up to 55 s with
timeout_seconds), 500 documents (up to 5,000 withmax_rows) and 1 MB per result. A cut result hastruncated: true. - No secrets in results. The key and tokens are removed from every error message.
Create a read-only service account
In the Google Cloud console for the Firebase project, or withgcloud:
roles/firebaseauth.viewer if agents should not look up users. Do not use the Firebase Admin SDK service account (firebase-adminsdk-...): it can write everything. If your organization blocks key creation, run the data-plane agent and store the key as a reference there.
Connect
Open Firebase in the dashboard’s tool catalog and click Connect, or let the agent callstore_credential. Paste the whole key file into Service account key. The project ID is read from the key; set Project ID only to read another project the account has access to, and Database ID only for a named database other than (default).
- Direct
- Data-plane agent
Firestore and Firebase Authentication are public Google services, so the connection is direct. Nothing needs to be allowlisted.
auth_required means Google refused the key (deleted or disabled); permission_denied means the account lacks the viewer role or Firestore is not enabled for the project.
Example prompts
- “Show me the order
orders/o_8812and the user who placed it.” - “Find this user’s failed payments in the last week, newest first.”
- “Is
alice@example.comsigned up, verified and not disabled? When did she last log in?” - “What subcollections does
users/alicehave?”
