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

# Get all accounts

> MCP tool to retrieve a paginated list of all accounts in the Thena platform.

import Admonition from '@theme/Admonition';

### MCP tool: `get_all_accounts`

Retrieves a paginated list of all accounts in the organization. This tool supports search, sorting, and pagination to help you efficiently browse and filter accounts.

<Admonition type="note">
  This tool supports pagination, search, and sorting parameters to help you efficiently retrieve accounts.
</Admonition>

### Example prompt

```prompt theme={null}
Get all accounts with search term "enterprise" and sort by name in descending order
```

<Admonition type="info">
  When you use this prompt in a chat with the model (with the MCP tool registered), the model will automatically call the <code>get\_all\_accounts</code> tool with the correct arguments.
</Admonition>

### Input parameters

| Name   | Type   | Required | Description                                  |
| ------ | ------ | -------- | -------------------------------------------- |
| page   | number | No       | Page number for pagination (default: 1)      |
| limit  | number | No       | Number of accounts per page (default: 10)    |
| search | string | No       | Search term to filter accounts               |
| sort   | string | No       | Field to sort by (e.g., "name", "createdAt") |
| order  | string | No       | Sort order: "ASC" or "DESC" (default: "ASC") |

### Response fields

Below are the fields you may see in each account object in the response:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>id</td><td>string</td><td>Unique identifier of the account</td></tr>
    <tr><td>name</td><td>string</td><td>Name of the account</td></tr>
    <tr><td>description</td><td>string</td><td>Description of the account</td></tr>
    <tr><td>source</td><td>string</td><td>Source of the account (e.g., "hubspot")</td></tr>
    <tr><td>logo</td><td>string</td><td>URL of the account logo</td></tr>
    <tr><td>statusId</td><td>string</td><td>ID of the account status</td></tr>
    <tr><td>status</td><td>string</td><td>Status of the account</td></tr>
    <tr><td>statusConfiguration</td><td>object</td><td>Configuration of the status</td></tr>
    <tr><td>classificationId</td><td>string</td><td>ID of the account classification</td></tr>
    <tr><td>classification</td><td>string</td><td>Classification of the account</td></tr>
    <tr><td>classificationConfiguration</td><td>object</td><td>Configuration of the classification</td></tr>
    <tr><td>healthId</td><td>string</td><td>ID of the account health</td></tr>
    <tr><td>health</td><td>string</td><td>Health of the account</td></tr>
    <tr><td>healthConfiguration</td><td>object</td><td>Configuration of the health</td></tr>
    <tr><td>industryId</td><td>string</td><td>ID of the account industry</td></tr>
    <tr><td>industry</td><td>string</td><td>Industry of the account</td></tr>
    <tr><td>industryConfiguration</td><td>object</td><td>Configuration of the industry</td></tr>
    <tr><td>primaryDomain</td><td>string</td><td>Primary domain of the account</td></tr>
    <tr><td>secondaryDomain</td><td>string</td><td>Secondary domain of the account</td></tr>
    <tr><td>accountOwner</td><td>string</td><td>Name of the account owner</td></tr>
    <tr><td>accountOwnerId</td><td>string</td><td>ID of the account owner</td></tr>
    <tr><td>accountOwnerEmail</td><td>string</td><td>Email of the account owner</td></tr>
    <tr><td>accountOwnerAvatarUrl</td><td>string</td><td>Avatar URL of the account owner</td></tr>
    <tr><td>annualRevenue</td><td>number</td><td>Annual revenue of the account</td></tr>
    <tr><td>employees</td><td>number</td><td>Number of employees</td></tr>
    <tr><td>website</td><td>string</td><td>Website of the account</td></tr>
    <tr><td>billingAddress</td><td>string</td><td>Billing address of the account</td></tr>
    <tr><td>shippingAddress</td><td>string</td><td>Shipping address of the account</td></tr>
    <tr><td>customFieldValues</td><td>array</td><td>Custom field values for the account</td></tr>
    <tr><td>metadata</td><td>object</td><td>Additional metadata for the account</td></tr>
    <tr><td>createdAt</td><td>string (ISO8601)</td><td>Creation timestamp</td></tr>
    <tr><td>updatedAt</td><td>string (ISO8601)</td><td>Last update timestamp</td></tr>
  </tbody>
</table>

### Sample response

```json theme={null}
{
  "data": [
    {
      "id": "ACC001",
      "name": "Acme Corporation",
      "description": "Leading technology solutions provider",
      "source": "hubspot",
      "logo": "https://example.com/logo.png",
      "statusId": "STATUS001",
      "status": "Active",
      "statusConfiguration": {
        "id": "STATUS001",
        "name": "Active",
        "color": "#10B981"
      },
      "classificationId": "CLASS001",
      "classification": "Enterprise",
      "classificationConfiguration": {
        "id": "CLASS001",
        "name": "Enterprise",
        "color": "#3B82F6"
      },
      "healthId": "HEALTH001",
      "health": "Good",
      "healthConfiguration": {
        "id": "HEALTH001",
        "name": "Good",
        "color": "#10B981"
      },
      "industryId": "IND001",
      "industry": "Technology",
      "industryConfiguration": {
        "id": "IND001",
        "name": "Technology",
        "color": "#8B5CF6"
      },
      "primaryDomain": "acme.com",
      "secondaryDomain": "acmecorp.com",
      "accountOwner": "John Doe",
      "accountOwnerId": "USER001",
      "accountOwnerEmail": "john.doe@company.com",
      "accountOwnerAvatarUrl": "https://example.com/avatar.jpg",
      "annualRevenue": 5000000,
      "employees": 250,
      "website": "https://acme.com",
      "billingAddress": "123 Business St, City, State 12345",
      "shippingAddress": "123 Business St, City, State 12345",
      "customFieldValues": [],
      "metadata": {
        "lastContactDate": "2025-07-24T10:00:00Z",
        "dealStage": "Negotiation"
      },
      "createdAt": "2025-07-24T07:19:10.258Z",
      "updatedAt": "2025-07-24T07:19:10.258Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1
  },
  "status": true,
  "message": "Accounts retrieved successfully!",
  "timestamp": "2025-07-25T12:50:38.937Z"
}
```

<Admonition type="tip">
  Always pass an object as input, even if empty, to avoid errors when calling the tool directly.
</Admonition>

***
