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

# Collate MCP Tools Reference

# Collate MCP Tools Reference

## Overview

This document provides detailed examples and usage patterns for all available Collate MCP tools. Each tool includes sample requests, responses, and common use cases.

## Available Tools

| Category              | Tools                                                                                                                                                                                         |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Discover**          | [search\_metadata](#search_metadata), [semantic\_search](#semantic_search), [search\_company\_context](#search_company_context), [nlq\_search](#nlq_search)                                   |
| **Inspect**           | [get\_entity\_details](#get_entity_details), [get\_company\_context](#get_company_context)                                                                                                    |
| **Lineage & Impact**  | [get\_entity\_lineage](#get_entity_lineage), [create\_lineage](#create_lineage), [root\_cause\_analysis](#root_cause_analysis)                                                                |
| **Knowledge**         | [create\_glossary](#create_glossary), [create\_glossary\_term](#create_glossary_term), [create\_context\_memory](#create_context_memory), [create\_article](#create_article)                  |
| **Govern & Classify** | [create\_classification](#create_classification), [create\_tag](#create_tag), [create\_domain](#create_domain), [create\_data\_product](#create_data_product), [patch\_entity](#patch_entity) |
| **Data Quality**      | [get\_test\_definitions](#get_test_definitions), [create\_test\_case](#create_test_case)                                                                                                      |
| **Metrics**           | [create\_metric](#create_metric)                                                                                                                                                              |

## Discover

Search and find data assets across your catalog using keyword, semantic, or natural language queries.

### search\_metadata

**Description**: Find data assets and business terms in your Collate catalog.

**Use Cases**:

* Discover tables containing specific data
* Find dashboards related to business areas
* Search for glossary terms
* Locate pipelines by name or description

**Parameters**

| Parameter    | Type    | Required | Description                                           |
| ------------ | ------- | -------- | ----------------------------------------------------- |
| `query`      | string  | Yes      | Keywords to search for                                |
| `entityType` | string  | No       | Filter by entity type (table, topic, dashboard, etc.) |
| `size`       | integer | No       | Max results to return (default: 10)                   |
| `fields`     | string  | No       | Comma-separated additional fields to include          |

**Entity Types**

* **Service Entities**: databaseService, messagingService, apiService, dashboardService, pipelineService, storageService, mlmodelService, metadataService, searchService
* **Data Asset Entities**: apiCollection, apiEndpoint, table, storedProcedure, database, databaseSchema, dashboard, dashboardDataModel, pipeline, chart, topic, searchIndex, mlmodel, container
* **User Entities**: user, team
* **Domain Entities**: domain, dataProduct
* **Governance Entities**: metric, glossary, glossaryTerm

**Examples**

**Basic Search**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_metadata",
    "arguments": {
      "query": "sales"
    }
  }
}
```

**Search for Specific Entity Type**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "search_metadata",
    "arguments": {
      "query": "customer",
      "entityType": "table",
      "size": 15
    }
  }
}
```

**Search with Additional Fields**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "search_metadata",
    "arguments": {
      "query": "order",
      "entityType": "table",
      "fields": "columns,queries,upstreamLineage",
      "size": 5
    }
  }
}
```

**Sample Response**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Found 5 results matching 'sales':\n\n**Tables:**\n1. **sales_transactions** (mysql_prod.ecommerce.public.sales_transactions)\n   - Description: Daily sales transaction records\n   - Service: mysql_prod (MySQL)\n   - Owners: sales-team, john.doe@company.com\n   - Tags: PII, Financial\n   - [View in OpenMetadata](https://your-om.com/table/mysql_prod.ecommerce.public.sales_transactions)\n\n2. **sales_reports** (postgresql_analytics.reporting.main.sales_reports)\n   - Description: Aggregated sales reporting data\n   - Service: postgresql_analytics (PostgreSQL)\n   - Owners: analytics-team\n   - [View in OpenMetadata](https://your-om.com/table/postgresql_analytics.reporting.main.sales_reports)\n\n**Dashboards:**\n3. **Sales Performance Dashboard** (looker_prod.sales.sales_performance)\n   - Description: Real-time sales KPI dashboard\n   - Service: looker_prod (Looker)\n   - Charts: 8 charts\n   - [View in OpenMetadata](https://your-om.com/dashboard/looker_prod.sales.sales_performance)"
      }
    ]
  }
}
```

### semantic\_search

**Description**: Meaning-based discovery of data assets using vector embeddings. Use this for exploratory or vague queries where exact names are unknown — it finds conceptually related assets even when keywords don't match.

**Parameters**

| Parameter   | Type    | Required | Description                                                                                                    |
| ----------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| `query`     | string  | Yes      | Natural language description of the data you're looking for                                                    |
| `filters`   | object  | No       | Optional filters. Supported keys: `entityType` (array), `service` (array), `tags` (array)                      |
| `size`      | integer | No       | Number of results to return. Default is 10, maximum is 50                                                      |
| `k`         | integer | No       | Number of nearest neighbors to consider internally (KNN parameter). Default is 100                             |
| `threshold` | number  | No       | Minimum similarity score (0.0–1.0). Default is 0.0 (no filtering). Use `0.5`–`0.7` for high-confidence results |

**Examples**

**Conceptual asset discovery**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "semantic_search",
    "arguments": {
      "query": "customer purchase history and spending behavior"
    }
  }
}
```

**Filtered semantic search**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "semantic_search",
    "arguments": {
      "query": "revenue forecasting metrics",
      "filters": { "entityType": ["dashboard"], "service": ["BigQuery"] },
      "threshold": 0.5
    }
  }
}
```

### search\_company\_context

**Description**: Semantic search over company context knowledge pills from the Context Center. Returns matching pills with their title, question, answer, summary, and source file. Use this to answer questions from company documents, runbooks, FAQs, and policies.

**Parameters**

| Parameter | Type    | Required | Description                                                               |
| --------- | ------- | -------- | ------------------------------------------------------------------------- |
| `query`   | string  | Yes      | Natural-language question or topic to find relevant company knowledge for |
| `size`    | integer | No       | Number of pills to return. Default is 10, maximum is 50                   |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_company_context",
    "arguments": {
      "query": "data retention policy",
      "size": 5
    }
  }
}
```

### nlq\_search

**Description**: Natural language query search across data assets. Interprets free-form questions and returns matching assets from the catalog. The `index` parameter accepts entity type names (e.g., `table`, `dashboard`) or the `dataAsset` alias for a broad cross-entity search.

**Parameters**

| Parameter         | Type    | Required | Description                                                                                                                 |
| ----------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `query`           | string  | No       | Natural language query. Defaults to `*` (return all)                                                                        |
| `limit`           | integer | No       | Maximum number of results to return. Default is 10                                                                          |
| `include_deleted` | boolean | No       | Include deleted entities in results. Default is `false`                                                                     |
| `index`           | string  | No       | Entity type or index to search. Default is `dataAsset`. Accepts entity types (e.g., `table`, `testCase`) or raw index names |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "nlq_search",
    "arguments": {
      "query": "show me all Tier 1 tables in the Finance domain",
      "limit": 10
    }
  }
}
```

## Inspect

Retrieve detailed information about specific entities and company knowledge pills.

### get\_entity\_details

**Description**: Retrieve detailed information about a specific entity using its fully qualified name.

**Parameters**

| Parameter    | Type   | Required | Description                                    |
| ------------ | ------ | -------- | ---------------------------------------------- |
| `entityType` | string | Yes      | Type of entity (table, topic, dashboard, etc.) |
| `fqn`        | string | Yes      | Fully qualified name of the entity             |

**Examples**

**Get Table Details**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "tools/call",
  "params": {
    "name": "get_entity_details",
    "arguments": {
      "entityType": "table",
      "fqn": "mysql_prod.ecommerce.public.customer_orders"
    }
  }
}
```

**Get Dashboard Details**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "tools/call",
  "params": {
    "name": "get_entity_details",
    "arguments": {
      "entityType": "dashboard",
      "fqn": "superset_prod.sales.quarterly_revenue"
    }
  }
}
```

**Sample Response**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "## Table: customer_orders\n\n**Fully Qualified Name**: mysql_prod.ecommerce.public.customer_orders\n\n**Basic Information**:\n- **Service**: mysql_prod (MySQL)\n- **Database**: ecommerce\n- **Schema**: public\n- **Type**: Regular Table\n- **Description**: Stores all customer order transactions with order details, timestamps, and status information\n\n**Ownership & Governance**:\n- **Owners**: ecommerce-team, sarah.johnson@company.com\n- **Tags**: PII, Financial, Customer-Data\n- **Tier**: Tier1\n\n**Schema** (5 columns):\n1. **order_id** (BIGINT) - Primary key, unique order identifier\n2. **customer_id** (BIGINT) - Foreign key to customer table\n3. **order_date** (TIMESTAMP) - When the order was placed\n4. **total_amount** (DECIMAL) - Total order value\n5. **status** (VARCHAR) - Order status (pending, completed, cancelled)\n\n**Usage Statistics**:\n- **Row Count**: ~2.5M rows\n- **Size**: 450 MB\n- **Last Updated**: 2024-01-15 09:30:00\n\n[View in OpenMetadata](https://your-om.com/table/mysql_prod.ecommerce.public.customer_orders)"
      }
    ]
  }
}
```

### get\_company\_context

**Description**: Fetch a single company context knowledge pill by its fully qualified name. Returns the full title, question, answer, summary, and source file. Use the `fullyQualifiedName` or `name` returned by `search_company_context`.

**Parameters**

| Parameter | Type   | Required | Description                                                                                                       |
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `fqn`     | string | Yes      | The `fullyQualifiedName` or `name` of the knowledge pill from a `search_company_context` result. Pass it verbatim |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_company_context",
    "arguments": {
      "fqn": "data-retention-policy.gdpr-rules"
    }
  }
}
```

## Lineage & Impact

Explore data dependencies, trace upstream sources, and analyze downstream impact.

### get\_entity\_lineage

**Description**: Retrieve upstream and downstream lineage information for any entity to understand data dependencies and impact analysis.

**Parameters**

| Parameter              | Type    | Required | Description                                                                  |
| ---------------------- | ------- | -------- | ---------------------------------------------------------------------------- |
| `entityType`           | string  | Yes      | Type of entity                                                               |
| `fqn`                  | string  | Yes      | Fully qualified name of the entity                                           |
| `upstreamDepth`        | integer | No       | Number of upstream hops to traverse (default: 3)                             |
| `downstreamDepth`      | integer | No       | Number of downstream hops to traverse (default: 3)                           |
| `includeColumnLineage` | boolean | No       | Include column-level lineage mappings. Default is `false` (table-level only) |

### create\_lineage

**Description**: Create a lineage relationship between two data assets. Requires the entity IDs (UUIDs), which you can retrieve using `get_entity_details` or `search_metadata`.

**Parameters**

| Parameter    | Type   | Required | Description                                                    |
| ------------ | ------ | -------- | -------------------------------------------------------------- |
| `fromEntity` | object | Yes      | Source entity with `type` (entity type string) and `id` (UUID) |
| `toEntity`   | object | Yes      | Destination entity with `type` and `id`                        |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_lineage",
    "arguments": {
      "fromEntity": {
        "type": "table",
        "id": "a1b2c3d4-0000-0000-0000-111111111111"
      },
      "toEntity": {
        "type": "table",
        "id": "e5f6a7b8-0000-0000-0000-222222222222"
      }
    }
  }
}
```

### root\_cause\_analysis

**Description**: Perform root cause analysis via data quality lineage. Identifies upstream failures causing issues on the specified asset, then analyzes downstream impact. If `status` is `failed`, check `upstreamAnalysis` for root causes and `downstreamAnalysis` for impact.

**Parameters**

| Parameter              | Type    | Required | Description                                                                                        |
| ---------------------- | ------- | -------- | -------------------------------------------------------------------------------------------------- |
| `fqn`                  | string  | Yes      | Fully qualified name of the entity to analyze                                                      |
| `entityType`           | string  | Yes      | Type of the entity (e.g., `table`, `dashboard`)                                                    |
| `upstreamDepth`        | integer | No       | Number of levels upstream to traverse. Default is 3                                                |
| `downstreamDepth`      | integer | No       | Number of levels downstream to traverse (only used when upstream failures are found). Default is 3 |
| `includeColumnLineage` | boolean | No       | Include column-level lineage on edges. Default is `false` (table-level only)                       |
| `includeDeleted`       | boolean | No       | Include deleted entities. Default is `false`                                                       |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "root_cause_analysis",
    "arguments": {
      "fqn": "bigquery_prod.analytics.reporting.sales_summary",
      "entityType": "table",
      "upstreamDepth": 3,
      "downstreamDepth": 3
    }
  }
}
```

## Knowledge

Create and manage glossaries, terms, articles, and reusable context memories.

### create\_glossary

**Description**: Create a new glossary to organize business terms and definitions.

**Parameters**

| Parameter           | Type    | Required | Description                          |
| ------------------- | ------- | -------- | ------------------------------------ |
| `name`              | string  | Yes      | Name of the glossary                 |
| `description`       | string  | Yes      | Description of the glossary          |
| `owners`            | array   | No       | List of owners (users or teams)      |
| `reviewers`         | array   | No       | List of reviewers (users or teams)   |
| `mutuallyExclusive` | boolean | Yes      | Whether terms are mutually exclusive |

**Examples**

**Create Business Glossary**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "tools/call",
  "params": {
    "name": "create_glossary",
    "arguments": {
      "name": "Marketing Terms",
      "description": "Collection of marketing-related terms and definitions used across campaigns, analytics, and reporting",
      "owners": ["marketing-team", "alice.smith@company.com"],
      "reviewers": ["data-governance-team"],
      "mutuallyExclusive": false
    }
  }
}
```

**Create Technical Glossary**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "create_glossary",
    "arguments": {
      "name": "Data Quality Metrics",
      "description": "Standardized definitions for data quality measurements and KPIs",
      "owners": ["data-quality-team"],
      "mutuallyExclusive": true
    }
  }
}
```

**Sample Response**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 6,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "✅ Successfully created glossary: **Marketing Terms**\n\n**Details**:\n- **Name**: Marketing Terms\n- **Description**: Collection of marketing-related terms and definitions used across campaigns, analytics, and reporting\n- **Owners**: marketing-team, alice.smith@company.com\n- **Reviewers**: data-governance-team\n- **Mutually Exclusive**: No\n- **Status**: Active\n\n**Next Steps**:\n- You can now add glossary terms to this glossary\n- Consider creating hierarchical terms for better organization\n- Set up approval workflows if needed\n\n[View Glossary in OpenMetadata](https://your-om.com/glossary/marketing-terms)"
      }
    ]
  }
}
```

### create\_glossary\_term

**Description**: Create a new term within an existing glossary, with support for hierarchical relationships.

**Parameters**

| Parameter     | Type   | Required | Description                      |
| ------------- | ------ | -------- | -------------------------------- |
| `glossary`    | string | Yes      | FQN of the parent glossary       |
| `name`        | string | Yes      | Name of the term                 |
| `description` | string | Yes      | Definition of the term           |
| `parentTerm`  | string | No       | FQN of parent term for hierarchy |
| `owners`      | array  | No       | List of owners (users or teams)  |

**Examples**

**Create Root Level Term**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 8,
  "method": "tools/call",
  "params": {
    "name": "create_glossary_term",
    "arguments": {
      "glossary": "marketing-terms",
      "name": "Customer Acquisition Cost",
      "description": "The total cost of acquiring a new customer, including marketing and sales expenses divided by the number of customers acquired in a specific period",
      "owners": ["marketing-team", "finance-team"]
    }
  }
}
```

**Create Child Term**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 9,
  "method": "tools/call",
  "params": {
    "name": "create_glossary_term",
    "arguments": {
      "glossary": "marketing-terms",
      "parentTerm": "marketing-terms.customer-acquisition-cost",
      "name": "Organic CAC",
      "description": "Customer acquisition cost specifically for customers acquired through organic channels (SEO, word of mouth, etc.) without paid advertising",
      "owners": ["marketing-team"]
    }
  }
}
```

**Sample Response**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 8,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "✅ Successfully created glossary term: **Customer Acquisition Cost**\n\n**Details**:\n- **Glossary**: Marketing Terms\n- **Full Path**: marketing-terms.customer-acquisition-cost\n- **Definition**: The total cost of acquiring a new customer, including marketing and sales expenses divided by the number of customers acquired in a specific period\n- **Owners**: marketing-team, finance-team\n- **Status**: Draft\n\n**Suggestions**:\n- Consider adding related terms like 'Customer Lifetime Value' and 'Return on Ad Spend'\n- You might want to create child terms for different acquisition channels\n- Add synonyms if this term is known by other names in your organization\n\n[View Term in OpenMetadata](https://your-om.com/glossary/marketing-terms/customer-acquisition-cost)"
      }
    ]
  }
}
```

### create\_context\_memory

**Description**: Save a reusable piece of knowledge to the Context Center — a preference, instruction, runbook step, or FAQ answer the assistant should retain across conversations. Use this when the user explicitly asks you to remember, note, or store something.

**Parameters**

| Parameter     | Type   | Required | Description                                                              |
| ------------- | ------ | -------- | ------------------------------------------------------------------------ |
| `name`        | string | Yes      | Stable, unique system name. Reusing an existing name updates that memory |
| `question`    | string | Yes      | The canonical question or instruction this memory represents             |
| `answer`      | string | Yes      | The canonical answer or guidance to retain                               |
| `title`       | string | No       | Short human-readable title shown in the Context Center                   |
| `summary`     | string | No       | One-line summary of the memory                                           |
| `memoryType`  | string | No       | `Preference`, `UseCase`, `Note`, `Runbook`, or `Faq`. Defaults to `Note` |
| `memoryScope` | string | No       | `UserGlobal` (broad) or `EntityScoped` (tied to a specific entity)       |
| `owners`      | array  | No       | Collate usernames or team names                                          |
| `tags`        | array  | No       | Tag FQNs to apply                                                        |
| `domains`     | array  | No       | Domain FQNs this memory belongs to                                       |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_context_memory",
    "arguments": {
      "name": "finance-warehouse-preference",
      "title": "Finance Dashboard Warehouse",
      "question": "Which warehouse should finance dashboards query?",
      "answer": "Always query the FINANCE_PROD warehouse for finance dashboards.",
      "memoryType": "Preference",
      "memoryScope": "UserGlobal",
      "domains": ["Finance"]
    }
  }
}
```

### create\_article

**Description**: Create a new knowledge article in the Collate knowledge base. Articles can be nested under a parent page and support an approval workflow when reviewers are set. Valid `entityStatus` values are: `Draft`, `In Review`, `Approved`, `Deprecated`, `Rejected`, `Unprocessed`.

**Parameters**

| Parameter      | Type   | Required | Description                                                                                            |
| -------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------ |
| `name`         | string | Yes      | Unique system name for the article                                                                     |
| `displayName`  | string | No       | Human-readable display name                                                                            |
| `description`  | string | No       | Article content in Markdown format                                                                     |
| `owners`       | array  | No       | Collate usernames or team names to set as owners                                                       |
| `reviewers`    | array  | No       | Collate usernames or team names to set as reviewers. When set, the article enters an approval workflow |
| `tags`         | array  | No       | Tag FQNs to apply (e.g., `Tier.Tier1`)                                                                 |
| `domains`      | array  | No       | Domain FQNs this article belongs to                                                                    |
| `entityStatus` | string | No       | Lifecycle status: `Draft`, `In Review`, `Approved`, `Deprecated`, `Rejected`, or `Unprocessed`         |
| `parent`       | string | No       | FQN of the parent knowledge page to nest this article under                                            |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_article",
    "arguments": {
      "name": "orders-table-guide",
      "displayName": "Orders Table Guide",
      "description": "## Overview\nThe `orders` table records all customer purchase transactions...",
      "owners": ["data-platform-team"],
      "reviewers": ["data-governance-team"],
      "tags": ["Tier.Tier1"],
      "domains": ["Finance"],
      "entityStatus": "Draft"
    }
  }
}
```

## Govern & Classify

Define and apply classifications, tags, domains, data products, and entity updates.

### create\_classification

**Description**: Create a new Classification in Collate. A Classification is a top-level container that groups related Tags (e.g., `PII`, `Tier`). The `name` becomes the root segment of every tag FQN under it. The `mutuallyExclusive` flag is immutable once the classification exists.

**Parameters**

| Parameter           | Type    | Required | Description                                                                                                       |
| ------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `name`              | string  | Yes      | Name of the classification. Becomes the root segment of tag FQNs (e.g., `PII` → `PII.Sensitive`). Must be unique. |
| `description`       | string  | Yes      | Description of the classification in Markdown format.                                                             |
| `displayName`       | string  | No       | Human-readable display name.                                                                                      |
| `mutuallyExclusive` | boolean | No       | If `true`, an entity can only carry one tag from this classification at a time. Immutable after creation.         |
| `owners`            | array   | No       | Collate usernames or team names to set as owners. Each must already exist.                                        |
| `reviewers`         | array   | No       | Collate usernames or team names to set as reviewers. Each must already exist.                                     |
| `domains`           | array   | No       | FQNs of domains this classification belongs to. Each domain must already exist.                                   |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_classification",
    "arguments": {
      "name": "PII",
      "description": "Tags for classifying Personally Identifiable Information across data assets.",
      "mutuallyExclusive": false,
      "owners": ["data-governance-team"],
      "reviewers": ["privacy-team"]
    }
  }
}
```

### create\_tag

**Description**: Create a new Tag inside an existing Classification in Collate. The tag FQN is `Classification.TagName` (e.g., `PII.Sensitive`). At least one of `classification` or `parent` must be provided.

**Parameters**

| Parameter           | Type    | Required | Description                                                                                                         |
| ------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `name`              | string  | Yes      | Name of the tag (the leaf segment, e.g., `Sensitive`). Must be unique within its parent.                            |
| `description`       | string  | Yes      | Description of the tag in Markdown format.                                                                          |
| `classification`    | string  | No       | Name of the classification this tag belongs to (e.g., `PII`). Must already exist. Optional if `parent` is provided. |
| `parent`            | string  | No       | FQN of the parent tag for a nested tag (e.g., `PII.PersonalData`). Must already exist. Omit for a top-level tag.    |
| `displayName`       | string  | No       | Human-readable display name.                                                                                        |
| `mutuallyExclusive` | boolean | No       | If `true`, child tags under this tag are mutually exclusive on an entity.                                           |
| `owners`            | array   | No       | Collate usernames or team names to set as owners. Each must already exist.                                          |
| `reviewers`         | array   | No       | Collate usernames or team names to set as reviewers. Each must already exist.                                       |
| `domains`           | array   | No       | FQNs of domains this tag belongs to. Each domain must already exist.                                                |

**Examples**

**Create a top-level tag**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_tag",
    "arguments": {
      "name": "Sensitive",
      "description": "Data that contains sensitive personal information requiring strict access controls.",
      "classification": "PII"
    }
  }
}
```

**Create a nested tag**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "create_tag",
    "arguments": {
      "name": "Email",
      "description": "Email addresses — a subset of sensitive personal data.",
      "parent": "PII.Sensitive"
    }
  }
}
```

### create\_domain

**Description**: Create a new Domain in Collate. A Domain is a top-level governance grouping of data assets. To create a child domain, set `parent` to the FQN of an existing parent domain. `domainType` defaults to `Aggregate` if omitted.

**Parameters**

| Parameter     | Type   | Required | Description                                                                                 |
| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------- |
| `name`        | string | Yes      | Name of the domain. Must be unique.                                                         |
| `description` | string | Yes      | Description of the domain in Markdown format.                                               |
| `domainType`  | string | No       | Type of domain: `Source-aligned`, `Consumer-aligned`, or `Aggregate` (default).             |
| `parent`      | string | No       | FQN of an existing parent domain when creating a child domain. Omit for a top-level domain. |
| `displayName` | string | No       | Human-readable display name.                                                                |
| `experts`     | array  | No       | Collate login names of domain experts (e.g., `john.doe`). Each must already exist.          |
| `owners`      | array  | No       | Collate usernames or team names to set as owners. Each must already exist.                  |
| `tags`        | array  | No       | Tag FQNs to apply to this domain (e.g., `Tier.Tier1`).                                      |

**Examples**

**Create a top-level domain**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_domain",
    "arguments": {
      "name": "Finance",
      "description": "Domain for all finance and accounting data assets.",
      "domainType": "Consumer-aligned",
      "experts": ["jane.doe"],
      "owners": ["finance-team"]
    }
  }
}
```

**Create a child domain**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "create_domain",
    "arguments": {
      "name": "Revenue",
      "description": "Sub-domain covering revenue tracking and forecasting.",
      "domainType": "Aggregate",
      "parent": "Finance"
    }
  }
}
```

### create\_data\_product

**Description**: Create a new Data Product in Collate. A Data Product groups data assets that deliver business value and must belong to at least one Domain. All referenced domain FQNs must already exist.

**Parameters**

| Parameter     | Type   | Required | Description                                                                                                         |
| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `name`        | string | Yes      | Name of the data product. Must be unique.                                                                           |
| `description` | string | Yes      | Description of the data product in Markdown format.                                                                 |
| `domains`     | array  | Yes      | FQNs of the domains this data product belongs to (e.g., `Finance`). At least one required; each must already exist. |
| `displayName` | string | No       | Human-readable display name.                                                                                        |
| `experts`     | array  | No       | Collate login names of data product experts (e.g., `john.doe`). Each must already exist.                            |
| `owners`      | array  | No       | Collate usernames or team names to set as owners. Each must already exist.                                          |
| `reviewers`   | array  | No       | Collate usernames or team names to set as reviewers. Each must already exist.                                       |
| `tags`        | array  | No       | Tag FQNs to apply to this data product (e.g., `Tier.Tier1`, `PII.Sensitive`).                                       |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_data_product",
    "arguments": {
      "name": "customer_360",
      "displayName": "Customer 360",
      "description": "Unified view of customer data including orders, support history, and lifetime value.",
      "domains": ["Finance", "Marketing"],
      "experts": ["alice.smith"],
      "owners": ["data-platform-team"],
      "tags": ["Tier.Tier1"]
    }
  }
}
```

### patch\_entity

**Description**: Update an entity using JSON Patch operations. Always look up the entity first to get its current state and UUID before patching. Array fields use plural names in paths: `/domains`, `/owners`, `/tags`, `/reviewers`.

**Parameters**

| Parameter    | Type   | Required | Description                                                                                                           |
| ------------ | ------ | -------- | --------------------------------------------------------------------------------------------------------------------- |
| `entityType` | string | Yes      | Type of entity to patch (e.g., `table`, `glossaryTerm`)                                                               |
| `fqn`        | string | Yes      | Fully qualified name of the entity to patch                                                                           |
| `patch`      | string | Yes      | JSON Patch operations array as a JSON string. Each operation has `op` (`add`/`remove`/`replace`), `path`, and `value` |

**Examples**

**Update a description**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "patch_entity",
    "arguments": {
      "entityType": "table",
      "fqn": "mysql_prod.ecommerce.public.orders",
      "patch": "[{\"op\": \"add\", \"path\": \"/description\", \"value\": \"Stores all customer orders with status and totals.\"}]"
    }
  }
}
```

**Add a domain**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "patch_entity",
    "arguments": {
      "entityType": "table",
      "fqn": "mysql_prod.ecommerce.public.orders",
      "patch": "[{\"op\": \"add\", \"path\": \"/domains/0\", \"value\": {\"id\": \"<domain-uuid>\", \"type\": \"domain\", \"name\": \"Finance\"}}]"
    }
  }
}
```

## Data Quality

Access test definitions and create test cases to validate your data assets.

### get\_test\_definitions

**Description**: List available test definitions that can be used to create data quality test cases. Use `entityType=TABLE` for table-level tests and `entityType=COLUMN` for column-level tests. Pass results to `create_test_case`.

**Parameters**

| Parameter      | Type    | Required | Description                                                                                                          |
| -------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
| `entityType`   | string  | Yes      | `TABLE` for table-level tests or `COLUMN` for column-level tests                                                     |
| `testPlatform` | string  | No       | Test platform filter. Default is `OpenMetadata`. Other options: `GreatExpectations`, `DBT`, `Deequ`, `Soda`, `Other` |
| `limit`        | integer | No       | Maximum number of results to return. Default is 10                                                                   |
| `after`        | string  | No       | Cursor value from a previous response's `nextCursor` field for pagination                                            |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_test_definitions",
    "arguments": {
      "entityType": "TABLE",
      "testPlatform": "OpenMetadata",
      "limit": 10
    }
  }
}
```

### create\_test\_case

**Description**: Create a data quality test case for a table or column. Use `get_test_definitions` first to find the right test definition and its required parameters.

**Parameters**

| Parameter            | Type   | Required | Description                                                                                            |
| -------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------ |
| `name`               | string | Yes      | Name of the test case                                                                                  |
| `fqn`                | string | Yes      | Fully qualified name of the table to test. Always use the table FQN, not a column FQN                  |
| `testDefinitionName` | string | Yes      | Name of the test definition to use                                                                     |
| `parameterValues`    | array  | Yes      | Array of `{ "name": "<param>", "value": "<value>" }` objects matching the test definition's parameters |
| `columnName`         | string | No       | Column name (leaf only, e.g., `shop_id`) for column-level tests                                        |
| `description`        | string | No       | Description of the test case                                                                           |

**Examples**

**Table-level row count test**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_test_case",
    "arguments": {
      "name": "orders_row_count_check",
      "fqn": "mysql_prod.ecommerce.public.orders",
      "testDefinitionName": "tableRowCountToBeBetween",
      "parameterValues": [
        { "name": "minValue", "value": "1000" },
        { "name": "maxValue", "value": "10000000" }
      ],
      "description": "Ensures the orders table always has rows within expected bounds."
    }
  }
}
```

**Column uniqueness test**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "create_test_case",
    "arguments": {
      "name": "orders_id_uniqueness",
      "fqn": "mysql_prod.ecommerce.public.orders",
      "testDefinitionName": "columnValuesToBeUnique",
      "columnName": "order_id",
      "parameterValues": []
    }
  }
}
```

## Metrics

Define and track measurable business and technical KPIs.

### create\_metric

**Description**: Create a new Metric entity representing a measurable business or technical KPI (e.g., daily revenue, error rate). Metrics can be expressed in SQL, Python, Java, or JavaScript.

**Parameters**

| Parameter                  | Type   | Required | Description                                                                                                                    |
| -------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `name`                     | string | Yes      | Unique name for the metric. Must not contain `::`                                                                              |
| `metricExpressionLanguage` | string | Yes      | Language for the expression: `SQL`, `Java`, `JavaScript`, `Python`, or `External`                                              |
| `metricExpressionCode`     | string | Yes      | Code or query that computes the metric (e.g., a SQL `SELECT` statement)                                                        |
| `description`              | string | No       | Description in Markdown format                                                                                                 |
| `displayName`              | string | No       | Human-readable display name                                                                                                    |
| `metricType`               | string | No       | `COUNT`, `SUM`, `AVERAGE`, `RATIO`, `PERCENTAGE`, `MIN`, `MAX`, `MEDIAN`, `MODE`, `STANDARD_DEVIATION`, `VARIANCE`, or `OTHER` |
| `granularity`              | string | No       | Time granularity: `SECOND`, `MINUTE`, `HOUR`, `DAY`, `WEEK`, `MONTH`, `QUARTER`, or `YEAR`                                     |
| `unitOfMeasurement`        | string | No       | `COUNT`, `DOLLARS`, `PERCENTAGE`, `TIMESTAMP`, `SIZE`, `REQUESTS`, `EVENTS`, `TRANSACTIONS`, or `OTHER`                        |
| `owners`                   | array  | No       | Collate usernames or team names to set as owners                                                                               |
| `tags`                     | array  | No       | Tag FQNs (e.g., `Tier.Tier1`)                                                                                                  |
| `domains`                  | array  | No       | Domain FQNs this metric belongs to                                                                                             |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_metric",
    "arguments": {
      "name": "daily_revenue",
      "displayName": "Daily Revenue",
      "description": "Total revenue from completed orders for a given day.",
      "metricExpressionLanguage": "SQL",
      "metricExpressionCode": "SELECT SUM(total_amount) FROM orders WHERE status = 'completed' AND DATE(order_date) = CURRENT_DATE",
      "metricType": "SUM",
      "granularity": "DAY",
      "unitOfMeasurement": "DOLLARS",
      "owners": ["finance-team"],
      "tags": ["Tier.Tier1"]
    }
  }
}
```
