> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Firebase

The Firebase connector lets your AI agent act in each user's Firebase account. Each user signs in to Firebase once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 17 tools.

**Authentication:** OAuth 2.0
**Categories:** Databases, Developer Tools
**Tools:** 17: 10 read, 5 write, 2 destructive
**Users sign in with:** OAuth
**OAuth app:** Your own Firebase app
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=FIREBASE)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Firebase connection

   In **AgentKit > Connections**, create a Firebase connection and copy its redirect URI. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Register an OAuth app

   Firebase connections use your own OAuth app. Register one with Firebase and add the redirect URI you copied.

   Then enter the app's Client ID and Client Secret on the Firebase connection.

5. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'firebase'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Firebase:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'firebase_auth_user_lookup',
     toolInput: { project_id: 'my-app-12345' },
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "firebase"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Firebase:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={"project_id":"my-app-12345"},
       tool_name="firebase_auth_user_lookup",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'firebase_auth_user_lookup',
  toolInput: {
    project_id: '<project_id>',
  },
  connector: 'firebase',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="firebase_auth_user_lookup",
    tool_input={
        "project_id": "<project_id>",
    },
    connection_name="firebase",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `firebase_auth_user_lookup`

Look Up Users · Read-only

Look up Firebase Auth users by UID, email address or phone number.
Returns users, an array of matching accounts with localId, email, emailVerified, displayName, phoneNumber, disabled, providerUserInfo, customAttributes, createdAt and lastLoginAt.
Use this when you know a user's UID, email or phone. Use firebase_auth_users_list to page through every user, and firebase_auth_users_query to sort or count users.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `emails` (`array`, optional): Email addresses of the users to fetch. Provide at least one of uids, emails or phone_numbers. Example: ["alice@example.com"].
- `phone_numbers` (`array`, optional): Phone numbers of the users to fetch, in E.164 format. Provide at least one of uids, emails or phone_numbers. Example: ["+15555550100"].
- `tenant_id` (`string`, optional): The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.
- `uids` (`array`, optional): UIDs (localId values) of the users to fetch. Provide at least one of uids, emails or phone_numbers. Example: ["5DxHkA3f9yTn2pQeLr7Wb1cZ0sU2"].

Example input: `{"project_id":"<project_id>"}`

### `firebase_auth_users_list`

List Users · Read-only

List all Firebase Auth users in a project, one page at a time, in UID order.
Returns users (each with localId, email, displayName, phoneNumber, disabled, providerUserInfo, createdAt and lastLoginAt) and a nextPageToken when more pages exist.
Use this to browse or export every user. Use firebase_auth_user_lookup when you know a UID, email or phone, and firebase_auth_users_query to sort or count users.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `max_results` (`integer`, optional): The maximum number of users to return in this page, from 1 to 1000. Defaults to 20. Example: 100.
- `next_page_token` (`string`, optional): The nextPageToken from a previous call, to fetch the following page. Example: 5DxHkA3f9yTn2pQeLr7Wb1cZ0sU2.
- `tenant_id` (`string`, optional): The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.

Example input: `{"project_id":"<project_id>"}`

### `firebase_auth_users_query`

Query Users · Read-only

Query Firebase Auth users with sorting and offset paging, optionally filtered by an exact email, UID or phone number, or just count them.
Returns recordsCount and, unless return_user_info is false, userInfo with the matching accounts.
Use this to sort users (for example by creation or last sign-in time) or to count them. Use firebase_auth_users_list for simple paging through every user, and firebase_auth_user_lookup to fetch known users.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `email` (`string`, optional): Only match the user with this email address (case-insensitive). Set at most one of email, uid or phone_number. Example: alice@example.com.
- `limit` (`integer`, optional): The maximum number of users to return, up to 500. Defaults to 500. Example: 50.
- `offset` (`integer`, optional): How many matching users to skip before returning results, for paging. Example: 50.
- `order` (`string`, optional): Sort direction, ASC or DESC. Defaults to ASC. Example: DESC. One of: `ASC`, `DESC`.
- `phone_number` (`string`, optional): Only match the user with this phone number, in E.164 format. Set at most one of email, uid or phone_number. Sorting is ignored with this filter. Example: +15555550100.
- `return_user_info` (`boolean`, optional): If false, only the number of matching users is returned, not the users themselves. Defaults to true. Example: false.
- `sort_by` (`string`, optional): The field to sort by. One of USER_ID, NAME, CREATED_AT, LAST_LOGIN_AT or USER_EMAIL. Defaults to USER_ID. Example: CREATED_AT. One of: `USER_ID`, `NAME`, `CREATED_AT`, `LAST_LOGIN_AT`, `USER_EMAIL`.
- `tenant_id` (`string`, optional): The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.
- `uid` (`string`, optional): Only match the user with this UID. Set at most one of email, uid or phone_number. Example: 5DxHkA3f9yTn2pQeLr7Wb1cZ0sU2.

Example input: `{"project_id":"<project_id>"}`

### `firebase_firestore_aggregation_query_run`

Run Aggregation Query · Read-only

Count, sum or average the documents that match a Cloud Firestore structured query, without returning the documents.
Returns an array whose result entry holds aggregateFields, one value per alias, plus a readTime.
Use this for totals such as how many documents match. Use firebase_firestore_query_run to get the matching documents themselves.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `aggregations` (`array`, required): One to five aggregations to compute. Each has an optional alias that names the result, and exactly one of count (an empty object, or upTo to stop counting early), sum or avg (each naming the numeric field to aggregate). Example: [{"alias": "total", "count": {}}, {"alias": "revenue", "sum": {"field": {"fieldPath": "amount"}}}].
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `structured_query` (`object`, required): A Firestore StructuredQuery object. from names the collection (set allDescendants to true to also match same-named subcollections at any depth); where holds a fieldFilter, compositeFilter or unaryFilter; orderBy, limit (which caps how many documents are aggregated), offset, select and startAt/endAt cursors are optional. Filter values use the same typed value objects as document fields. Example: {"from": [{"collectionId": "users"}], "where": {"fieldFilter": {"field": {"fieldPath": "age"}, "op": "GREATER_THAN_OR_EQUAL", "value": {"integerValue": "21"}}}, "orderBy": [{"field": {"fieldPath": "age"}, "direction": "DESCENDING"}], "limit": 20}.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `parent_path` (`string`, optional): Where to look, relative to the database. Use documents for the top level of the database, or documents/<document path> for the subcollections of one document. Example: documents or documents/users/alice. Default: `documents`.

Example input: `{"aggregations":[{"alias":"total","count":{}},{"alias":"revenue","sum":{"field":{"fieldPath":"amount"}}}],"project_id":"<project_id>","structured_query":{}}`

### `firebase_firestore_collection_ids_list`

List Collection IDs · Read-only

List the IDs of the collections at the top level of a Cloud Firestore database or directly under one document.
Returns collectionIds (an array of collection ID strings) and a nextPageToken when more pages exist.
Use this to discover which collections exist before listing or querying documents. Use firebase_firestore_documents_list to see the documents inside a collection.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `page_size` (`integer`, optional): The maximum number of collection IDs to return in this page. Example: 100.
- `page_token` (`string`, optional): The nextPageToken from a previous call, to fetch the following page. Example: Y2hhdHJvb21z.
- `parent_path` (`string`, optional): Where to look, relative to the database. Use documents for the top level of the database, or documents/<document path> for the subcollections of one document. Example: documents or documents/users/alice. Default: `documents`.

Example input: `{"project_id":"<project_id>"}`

### `firebase_firestore_databases_list`

List Firestore Databases · Read-only

List the Cloud Firestore databases in a Firebase project.
Returns each database's resource name (projects/<project>/databases/<database_id>), type, location, and concurrency mode.
Use this to find a database ID before calling the other firebase_firestore tools. Most projects only have the (default) database.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.

Example input: `{"project_id":"<project_id>"}`

### `firebase_firestore_document_get`

Get Document · Read-only

Get one Cloud Firestore document by its path.
Returns the document's resource name, its fields as typed values, and its createTime and updateTime.
Use this when you know the exact document path. Use firebase_firestore_documents_batch_get to fetch several known documents at once, and firebase_firestore_query_run to find documents by field values.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `document_path` (`string`, required): The document path relative to the database root, made of alternating collection and document IDs. Example: users/alice or users/alice/orders/order-123.
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `mask_field_paths` (`array`, optional): Field paths to return. When set, only these fields come back in each document; when empty, all fields are returned. Use dots for nested fields. Example: ["name", "address.city"].

Example input: `{"document_path":"<document_path>","project_id":"<project_id>"}`

### `firebase_firestore_documents_batch_get`

Batch Get Documents · Read-only

Get several Cloud Firestore documents by path in one request.
Returns an array with one entry per path: found holds the document, or missing holds the name of a document that does not exist.
Use this when you already know two or more document paths. Use firebase_firestore_document_get for a single document.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `document_paths` (`array`, required): The document paths to fetch, each relative to the database root (alternating collection and document IDs). Example: ["users/alice", "users/bob"].
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `mask_field_paths` (`array`, optional): Field paths to return. When set, only these fields come back in each document; when empty, all fields are returned. Use dots for nested fields. Example: ["name", "address.city"].

Example input: `{"document_paths":["users/alice","users/bob"],"project_id":"<project_id>"}`

### `firebase_firestore_documents_list`

List Documents · Read-only

List the documents in one Cloud Firestore collection, one page at a time.
Returns an array of documents (name, fields, createTime, updateTime) and a nextPageToken when more pages exist.
Use this to browse a collection in order. Use firebase_firestore_query_run to filter documents by field values, and firebase_firestore_collection_ids_list to discover collection names.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `collection_path` (`string`, required): The collection path relative to the database root. For a top-level collection this is the collection ID; for a subcollection it is the parent document path followed by the collection ID. Example: users or users/alice/orders.
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `mask_field_paths` (`array`, optional): Field paths to return. When set, only these fields come back in each document; when empty, all fields are returned. Use dots for nested fields. Example: ["name", "address.city"].
- `order_by` (`string`, optional): Sort order, as a comma-separated list of field paths each optionally followed by desc. Example: createdAt desc, __name__ desc.
- `page_size` (`integer`, optional): The maximum number of documents to return in this page. Firestore may return fewer. Example: 50.
- `page_token` (`string`, optional): The nextPageToken from a previous call, to fetch the following page. Keep every other input the same when paginating. Example: AFTOeJx...
- `show_missing` (`boolean`, optional): If true, also list missing documents: document IDs that have no fields of their own but have subcollections beneath them. Such entries only carry a name. Example: false.

Example input: `{"collection_path":"<collection_path>","project_id":"<project_id>"}`

### `firebase_firestore_query_run`

Run Query · Read-only

Run a structured query against Cloud Firestore to find documents that match filters, with sorting and a limit.
Returns an array of results; each entry with a document holds one match, with its name, fields, createTime and updateTime, plus a readTime.
Use this to search by field values. Use firebase_firestore_documents_list to page through a whole collection, and firebase_firestore_aggregation_query_run to count, sum or average instead of returning documents.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `structured_query` (`object`, required): A Firestore StructuredQuery object. from names the collection (set allDescendants to true to also match same-named subcollections at any depth); where holds a fieldFilter, compositeFilter or unaryFilter; orderBy, limit, offset, select and startAt/endAt cursors are optional. Filter values use the same typed value objects as document fields. Example: {"from": [{"collectionId": "users"}], "where": {"fieldFilter": {"field": {"fieldPath": "age"}, "op": "GREATER_THAN_OR_EQUAL", "value": {"integerValue": "21"}}}, "orderBy": [{"field": {"fieldPath": "age"}, "direction": "DESCENDING"}], "limit": 20}.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `parent_path` (`string`, optional): Where to look, relative to the database. Use documents for the top level of the database, or documents/<document path> for the subcollections of one document. Example: documents or documents/users/alice. Default: `documents`.

Example input: `{"project_id":"<project_id>","structured_query":{}}`

### `firebase_auth_email_action_link_generate`

Generate Email Action Link · Write

Generate a password reset, email verification or email sign-in link for a Firebase Auth user, for you to send yourself.
Returns the email and oobLink with the action link. This tool does not have Firebase email a verification link: that needs the user's ID token, which this tool does not take.
Use this to help a user reset a password, verify an email address or sign in by email link. Use firebase_auth_user_update to set a password directly.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `email` (`string`, required): The email address of the user the link is for. Example: alice@example.com.
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `request_type` (`string`, required): The kind of link: PASSWORD_RESET, VERIFY_EMAIL or EMAIL_SIGNIN. Example: PASSWORD_RESET. One of: `PASSWORD_RESET`, `VERIFY_EMAIL`, `EMAIL_SIGNIN`.
- `continue_url` (`string`, optional): The URL the user is sent to after using the link. Required for EMAIL_SIGNIN; its domain must be in the project's authorized domains. Example: https://app.example.com/finish.
- `return_oob_link` (`boolean`, optional): If true (the default), the link is returned in oobLink for you to send, and no email is sent. Keep it true for VERIFY_EMAIL: Firebase emails a verification link only when given the user's ID token, which this tool does not send. Example: true. Default: `true`.
- `tenant_id` (`string`, optional): The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.

Example input: `{"email":"<email>","project_id":"<project_id>","request_type":"PASSWORD_RESET"}`

### `firebase_auth_user_create`

Create User · Write

Create a new Firebase Auth user with an email and password, a phone number, or neither.
Returns the new user's localId (UID), email and displayName.
Use this to add an account as an administrator. Use firebase_auth_user_update to change an existing user.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `disabled` (`boolean`, optional): If true, the user is created disabled and cannot sign in until enabled. Example: false.
- `display_name` (`string`, optional): The user's display name. Example: Alice Smith.
- `email` (`string`, optional): The new user's email address. Required when password is set. Example: alice@example.com.
- `email_verified` (`boolean`, optional): Whether the user's email address is marked as verified. Example: true.
- `password` (`string`, optional): The new user's password, at least 6 characters. Requires email. Leave empty for a user who signs in another way (for example by phone or email link). Example: S3cure-Passw0rd.
- `phone_number` (`string`, optional): The user's phone number in E.164 format. Example: +15555550100.
- `photo_url` (`string`, optional): A URL of the user's profile photo. Example: https://example.com/alice.png.
- `tenant_id` (`string`, optional): The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.
- `uid` (`string`, optional): A UID to assign to the new user, unique in the project and up to 128 characters. Leave empty to let Firebase generate one. Example: alice-001.

Example input: `{"project_id":"<project_id>"}`

### `firebase_auth_user_update`

Update User · Write

Update an existing Firebase Auth user's profile, credentials, status or custom claims by UID.
Returns the updated user's localId, email, displayName, photoUrl, emailVerified and providerUserInfo.
Use this to change email, password, display name, phone, disabled state or custom claims. Use firebase_auth_user_create to add a new user.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `uid` (`string`, required): The user's Firebase Auth UID (localId). Get it from firebase_auth_user_lookup or firebase_auth_users_list. Example: 5DxHkA3f9yTn2pQeLr7Wb1cZ0sU2.
- `custom_claims` (`string`, optional): Custom claims to put in the user's ID tokens, as a JSON object encoded as a string, up to 1000 bytes. This replaces any existing custom claims; pass "{}" to clear them. Example: {"role": "admin"}.
- `delete_attributes` (`array`, optional): Profile attributes to clear from the user. Allowed values are DISPLAY_NAME and PHOTO_URL. Example: ["PHOTO_URL"].
- `delete_providers` (`array`, optional): Sign-in provider IDs to unlink from the user. Use phone to remove the phone number sign-in. Example: ["google.com"].
- `disabled` (`boolean`, optional): true disables the account so the user can no longer sign in; false enables it again. Example: true.
- `display_name` (`string`, optional): The user's new display name. To clear it, use delete_attributes with DISPLAY_NAME instead. Example: Alice Smith.
- `email` (`string`, optional): The user's new email address. Example: alice@example.com.
- `email_verified` (`boolean`, optional): Whether the user's email address is marked as verified. Example: true.
- `password` (`string`, optional): A new password for the user, at least 6 characters. Example: S3cure-Passw0rd.
- `phone_number` (`string`, optional): The user's new phone number in E.164 format. Example: +15555550100.
- `photo_url` (`string`, optional): A new profile photo URL. To clear it, use delete_attributes with PHOTO_URL instead. Example: https://example.com/alice.png.
- `tenant_id` (`string`, optional): The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.

Example input: `{"project_id":"<project_id>","uid":"<uid>"}`

### `firebase_firestore_document_create`

Create Document · Write

Create a new document in a Cloud Firestore collection, with a chosen or auto-generated ID.
Returns the created document: its full resource name (which holds the new ID), fields, createTime and updateTime.
Use this to add a document that must not already exist; it fails if the ID is taken. Use firebase_firestore_document_update to change an existing document or to write a document at a fixed path whether or not it exists.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `collection_path` (`string`, required): The collection path relative to the database root. For a top-level collection this is the collection ID; for a subcollection it is the parent document path followed by the collection ID. Example: users or users/alice/orders.
- `fields` (`object`, required): The document's fields as a map from field name to a typed Firestore value. Each value is an object with exactly one key that names its type: stringValue, integerValue (the number as a string), doubleValue, booleanValue, timestampValue (RFC 3339), nullValue ("NULL_VALUE"), referenceValue, geoPointValue, arrayValue (holding a values list) or mapValue (holding a nested fields map). Example: {"name": {"stringValue": "Alice"}, "age": {"integerValue": "30"}, "tags": {"arrayValue": {"values": [{"stringValue": "vip"}]}}}.
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `document_id` (`string`, optional): The ID to give the new document. Leave empty to let Firestore generate a random 20-character ID. Example: alice.

Example input: `{"collection_path":"<collection_path>","fields":{},"project_id":"<project_id>"}`

### `firebase_firestore_document_update`

Update Document · Write

Update the fields of a Cloud Firestore document, or write the whole document at a path.
Returns the document as stored after the write, with all its fields and the new updateTime.
Pass update_mask_field_paths to change only those fields and keep the rest; without it the document is replaced and is created if missing. Use firebase_firestore_document_create to add a new document with an auto-generated ID.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `document_path` (`string`, required): The document path relative to the database root, made of alternating collection and document IDs. Example: users/alice or users/alice/orders/order-123.
- `fields` (`object`, required): The fields to write as a map from field name to a typed Firestore value. Each value is an object with exactly one key that names its type: stringValue, integerValue (the number as a string), doubleValue, booleanValue, timestampValue (RFC 3339), nullValue ("NULL_VALUE"), referenceValue, geoPointValue, arrayValue (holding a values list) or mapValue (holding a nested fields map). Example: {"name": {"stringValue": "Alice"}, "age": {"integerValue": "30"}, "tags": {"arrayValue": {"values": [{"stringValue": "vip"}]}}}.
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `current_document_exists` (`boolean`, optional): A precondition. true makes the write fail if the document does not exist (a pure update); false makes it fail if the document already exists. Leave empty for no precondition. Example: true.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.
- `update_mask_field_paths` (`array`, optional): The field paths to update. Only these fields are changed; a listed field that is not in fields is deleted from the document. When empty, the whole document is replaced by fields. Use dots for nested fields. Example: ["status", "address.city"].

Example input: `{"document_path":"<document_path>","fields":{},"project_id":"<project_id>"}`

### `firebase_auth_user_delete`

Delete User · Destructive

Permanently delete a Firebase Auth user by UID.
Returns an empty result on success. The user's data in Firestore or other services is not deleted.
Use this to remove an account for good. To block sign-in but keep the account, use firebase_auth_user_update with disabled set to true.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `uid` (`string`, required): The user's Firebase Auth UID (localId). Get it from firebase_auth_user_lookup or firebase_auth_users_list. Example: 5DxHkA3f9yTn2pQeLr7Wb1cZ0sU2.
- `tenant_id` (`string`, optional): The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.

Example input: `{"project_id":"<project_id>","uid":"<uid>"}`

### `firebase_firestore_document_delete`

Delete Document · Destructive

Delete one Cloud Firestore document by its path.
Returns an empty object on success. Subcollections under the document are not deleted.
Use this to remove a single document. To remove only some fields, use firebase_firestore_document_update with those fields in update_mask_field_paths.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `document_path` (`string`, required): The document path relative to the database root, made of alternating collection and document IDs. Example: users/alice or users/alice/orders/order-123.
- `project_id` (`string`, required): The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
- `current_document_exists` (`boolean`, optional): A precondition. true makes the delete fail with NOT_FOUND if the document does not exist; leave empty to succeed either way. Example: true.
- `database_id` (`string`, optional): The Firestore database ID. Most projects have only the default database, whose ID is (default). Use firebase_firestore_databases_list to see other databases. Example: (default). Default: `(default)`.

Example input: `{"document_path":"<document_path>","project_id":"<project_id>"}`

## Related

Other Databases connectors ([all 39](/agentkit/connectors/?category=databases)):

- [AWS Redshift](/agentkit/connectors/redshift/): Scalekit connector, Trusted identity provider, 10 tools
- [Google BigQuery](/agentkit/connectors/bigquery/): Scalekit connector, OAuth, 47 tools
- [Airtable](/agentkit/connectors/airtable/): Scalekit connector, OAuth, 26 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
