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

# Tools Reference

> Available MCP tools for Well

## well\_get\_schema

Discover available data types and fields.

| Parameter | Type   | Required | Description                                                                                               |
| --------- | ------ | -------- | --------------------------------------------------------------------------------------------------------- |
| `root`    | string | No       | `invoices`, `companies`, `people`, `documents`, `connectors`, `transactions`, `accounts`, `payment_means` |
| `depth`   | number | No       | 0=scalars, 1=relations (default), 2=nested                                                                |

## well\_query\_records

Query records from Well's database.

| Parameter   | Type    | Required | Description                                               |
| ----------- | ------- | -------- | --------------------------------------------------------- |
| `root`      | string  | Yes      | Entity type                                               |
| `fields`    | array   | No\*     | Field paths as arrays, e.g. `["invoices", "grand_total"]` |
| `allFields` | boolean | No\*     | Fetch all scalar fields                                   |
| `limit`     | number  | No       | Max records (default 50, max 500)                         |

\*Either `fields` or `allFields: true` required

## well\_create\_company

Create a new company.

| Parameter | Type   | Required | Description    |
| --------- | ------ | -------- | -------------- |
| `name`    | string | Yes      | Company name   |
| `domain`  | string | No       | Website domain |
| `tax_id`  | string | No       | Tax ID         |

## well\_create\_person

Create a new contact.

| Parameter    | Type   | Required | Description   |
| ------------ | ------ | -------- | ------------- |
| `first_name` | string | Yes      | First name    |
| `last_name`  | string | No       | Last name     |
| `email`      | string | No       | Email address |
| `phone`      | string | No       | Phone (E.164) |

***

## Examples

### Example 1: Query financial data

**User prompt:**

```
Show me all unpaid invoices over 1000 EUR from the last 3 months
```

**What happens:**

* Server calls `well_get_schema("invoices")` to discover available fields
* Server calls `well_query_records` with invoice root, filtering by status and amount
* Returns matching invoices with invoice number, amount, due date, and issuer name
* AI presents results in a formatted table

***

### Example 2: Create a new contact

**User prompt:**

```
Create a new contact: John Doe, email john@acme.com, CEO at Acme Corp
```

**What happens:**

* Server calls `well_create_company` to create Acme Corp if it doesn't exist
* Server calls `well_create_person` with first\_name, last\_name, email, and job\_title
* Returns confirmation with the new person ID and company association
* Contact is immediately available in your Well workspace

***

### Example 3: Build a financial dashboard

**User prompt:**

```
Create a complete financial dashboard in React with shadcn/ui dark mode showing:
- KPI cards: Total received, Total spent, Net balance, Invoice count
- Area chart of cash flow over 12 months
- Tabs for Income, Expenses, Analytics
- Pie charts for client/supplier breakdown
- Use my actual invoice data from Well
```

**What happens:**

* Server calls `well_query_records` to fetch all invoices with issuer, receiver, amounts, and dates
* Server calls `well_query_records` to fetch companies data
* AI analyzes the data structure and generates a complete React dashboard artifact
* Dashboard displays real financial data with interactive charts (Recharts)
* Includes filtering, sorting, and responsive dark mode design

***

### Example 4: Query transactions

**User prompt:**

```
Show me all transactions from last month
```

**What happens:**

* Server calls `well_get_schema("transactions")` to discover available fields
* Server calls `well_query_records` with transactions root, filtering by date
* Returns matching transactions with amounts, dates, and associated accounts
* AI presents results in a formatted table

***

### Example 5: View connected accounts

**User prompt:**

```
What bank accounts are connected to my workspace?
```

**What happens:**

* Server calls `well_get_schema("accounts")` to discover available fields
* Server calls `well_query_records` with accounts root
* Returns all connected accounts with provider, status, and balance info
* AI presents a summary of connected financial accounts
