> ## 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.

# Filter accounts by IDs

> MCP tool to filter accounts by a list of account IDs in the Thena platform.

import Admonition from '@theme/Admonition';

### MCP tool: `filter_accounts_by_ids`

Filters accounts based on a list of account IDs. This tool is useful for retrieving specific accounts when you have their IDs, or for bulk operations on a set of known accounts.

<Admonition type="note">
  You must provide an array of account IDs to filter accounts by.
</Admonition>

### Example prompt

```prompt theme={null}
Filter accounts by IDs ["ACC001", "ACC002", "ACC003"]
```

<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>filter\_accounts\_by\_ids</code> tool with the correct arguments.
</Admonition>

### Input parameters

| Name | Type      | Required | Description                      |
| ---- | --------- | -------- | -------------------------------- |
| ids  | string\[] | Yes      | List of account IDs to filter by |

### 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"
    },
    {
      "id": "ACC002",
      "name": "TechCorp Solutions",
      "description": "Technology consulting firm",
      "source": "manual",
      "logo": "https://example.com/techcorp-logo.png",
      "statusId": "STATUS002",
      "status": "Prospect",
      "statusConfiguration": {
        "id": "STATUS002",
        "name": "Prospect",
        "color": "#F59E0B"
      },
      "classificationId": "CLASS002",
      "classification": "Mid Market",
      "classificationConfiguration": {
        "id": "CLASS002",
        "name": "Mid Market",
        "color": "#8B5CF6"
      },
      "healthId": "HEALTH002",
      "health": "Yellow",
      "healthConfiguration": {
        "id": "HEALTH002",
        "name": "Yellow",
        "color": "#F59E0B"
      },
      "industryId": "IND001",
      "industry": "Technology",
      "industryConfiguration": {
        "id": "IND001",
        "name": "Technology",
        "color": "#8B5CF6"
      },
      "primaryDomain": "techcorp.com",
      "secondaryDomain": null,
      "accountOwner": "Jane Smith",
      "accountOwnerId": "USER002",
      "accountOwnerEmail": "jane.smith@company.com",
      "accountOwnerAvatarUrl": "https://example.com/jane-avatar.jpg",
      "annualRevenue": 2000000,
      "employees": 100,
      "website": "https://techcorp.com",
      "billingAddress": "456 Tech Ave, Innovation City, CA 94025",
      "shippingAddress": "456 Tech Ave, Innovation City, CA 94025",
      "customFieldValues": [],
      "metadata": {
        "leadSource": "Website",
        "dealStage": "Qualification"
      },
      "createdAt": "2025-07-24T08:19:10.258Z",
      "updatedAt": "2025-07-24T08:19:10.258Z"
    }
  ],
  "status": true,
  "message": "Accounts filtered 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>

***
