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

# MCP Tools Reference

> Reference for all OpenMetadata MCP tools, with parameters and examples for search, context, lineage, create and patch, data quality, and the knowledge graph.

# OpenMetadata MCP Tools Reference

All OpenMetadata MCP tools, with parameters and examples.

## Available Tools

Tools are labeled **Read** (retrieve data only) or **Write** (create or modify data).

Administrators can block all Write tools with **Read-only Mode**, or turn off individual tools with **Disabled Tools**. See [Restricting MCP Tools](https://docs.open-metadata.org/v2.1.x/how-to-guides/mcp/oauth.md#restricting-mcp-tools).

| Category | Tools |
| - | - |
| **Discover** | [search\_metadata](#search_metadata), [semantic\_search](#semantic_search), [company\_context](#company_context) |
| **Inspect** | [get\_entity\_details](#get_entity_details) |
| **Context** | [get\_user\_context](#get_user_context), [get\_persona\_context](#get_persona_context), [find\_context](#find_context), [get\_concept\_context](#get_concept_context) |
| **Lineage & Impact** | [get\_entity\_lineage](#get_entity_lineage), [create\_lineage](#create_lineage), [root\_cause\_analysis](#root_cause_analysis) |
| **Create & Modify** | [create\_entity](#create_entity), [describe\_entity\_type](#describe_entity_type), [patch\_entity](#patch_entity) |
| **Data Quality** | [get\_test\_definitions](#get_test_definitions), [create\_test\_case](#create_test_case) |
| **Knowledge Graph** | [sparql\_query](#sparql_query), [entity\_neighborhood](#entity_neighborhood), [find\_by\_tag](#find_by_tag), [shacl\_validate](#shacl_validate), [ontology\_describe](#ontology_describe) |

## Which Tool to Call First

**If you already have a fully qualified name** (from a prior result, a user-supplied FQN, or a UI deep link), start with `get_entity_details`. Add `include: ["context", "lineage", "quality"]` as needed. This resolves most questions about a known asset in a single call.

**If you don't have a fully qualified name yet**, start with `search_metadata` (exact names, owners, tags, tiers) or `semantic_search` (vague or conceptual queries), then pass the `fullyQualifiedName` from a result into `get_entity_details`.

Starting broad with `search_metadata` when you already know the FQN adds unnecessary round trips (re-searching, re-confirming the match) that calling the lookup tool directly avoids.

## Fully Qualified Name (FQN) Format

An entity's FQN is a dot-separated path built from the entity and its ancestors. The number of segments depends on entity type:

| Entity Type | FQN Pattern | Example |
| - | - | - |
| Table | `service.database.schema.table` | `snowflake_prod.analytics.public.customers` |
| Database Schema | `service.database.schema` | `snowflake_prod.analytics.public` |
| Database | `service.database` | `snowflake_prod.analytics` |
| Dashboard | `service.dashboardName` | `sample_superset.10` |
| Tag | `Classification.TagName` | `PII.Sensitive` |
| Glossary Term | `glossary.term` | `marketing-terms.customer-acquisition-cost` |

Consult the entity's [API Reference](https://docs.open-metadata.org/v2.1.x/api-reference/data-assets.md) page for entity types not listed here.

**Special Characters**: If a name segment contains a period (`.`) or a double quote (`"`), wrap that segment in double quotes, escaping any internal `"` by doubling it. For example, a schema literally named `sales.eu` inside database `prod` becomes `service.prod."sales.eu".table`.

## Discover

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

### search\_metadata

**Type**: Read

**Description**: Find data assets and business terms by keyword. Use when you know specific names, owners, tags, tiers, services, or column names.

**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 | No | Keywords to search for |
| `entityType` | string | No | Filter by entity type (see list below) |
| `size` | integer | No | Max results to return (default: 10, max: 50) |
| `from` | integer | No | Offset for pagination (default: 0) |
| `cursor` | string | No | Pagination cursor — pass the `nextCursor` value from the previous response to get the next page. Takes precedence over `from` when both are provided. |
| `fields` | string | No | Comma-separated additional fields to include |
| `queryFilter` | string | No | Advanced: direct OpenSearch DSL JSON query. Example: `{"bool": {"must": [{"term": {"entityType": "table"}}, {"term": {"tags.tagFQN": "PII.Sensitive"}}]}}` |
| `includeDeleted` | boolean | No | Include deleted entities (default: false) |
| `includeAggregations` | boolean | No | Include aggregation/facet data (default: false) |
| `maxAggregationBuckets` | integer | No | Max buckets per aggregation (default: 10, max: 50) |

> [!WARNING]
>
> Three rules are easy to get silently wrong with this tool:
>
> * **`queryFilter` value**: Omit it entirely rather than sending an empty string, `"null"`, or `"{}"`. A degenerate value is not treated as "no filter": it currently produces a `400 JSON parsing failed` error instead of falling through to a normal keyword search.
> * **Batch-reading known entities**: To hydrate several already-known entities in one call instead of one `get_entity_details` call per entity, use a `terms` clause on `fullyQualifiedName` in `queryFilter` together with `fields`.
> * **Finding a table's data-quality tests**: Match on `originEntityFQN`, not `entityFQN`. A column-level test stores the column's FQN in `entityFQN`, so filtering on the table's FQN there silently returns only table-level tests, with a clean but wrong total.
>
> `fullyQualifiedName`, `entityFQN`, and `originEntityFQN` are indexed with a lowercase normalizer. Values passed in a `term`/`terms` clause must be lowercased, or the clause silently matches zero rows.

**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`
* **Data Quality Entities**: `testCase`, `testSuite`, `testCaseResult`

**Examples**

**Basic Search**:

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

**Search for a 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\n2. **sales_reports** (postgresql_analytics.reporting.main.sales_reports)\n   - Description: Aggregated sales reporting data\n   - Service: postgresql_analytics (PostgreSQL)\n\n**Dashboards:**\n3. **Sales Performance Dashboard** (looker_prod.sales.sales_performance)\n   - Description: Real-time sales KPI dashboard\n   - Charts: 8 charts"
      }
    ]
  }
}
```

> [!NOTE]
>
> Results include a `similarityScore` field for each entity whenever the search backend returns a relevance score for that hit. This is the backend's raw, opaque score (not a value normalized to a 0.0–1.0 range), so absolute values vary by query and are not comparable across searches — only relative ordering within the same result set is meaningful. Higher scores indicate stronger relevance.

### semantic\_search

**Type**: Read

**Description**: Find data assets by meaning using vector search ([setup guide](https://docs.open-metadata.org/v2.1.x/deployment/semantic-search.md#enable-semantic-search)). Use for exploratory queries where you don't know exact names. Returns conceptually related assets even when no keywords match. The tool returns only the assets the caller can view.

**Use Cases**:

* Explore data when you don't know exact table names
* Find assets related to a concept (e.g., "customer spending behavior")
* Discover hidden relationships across services

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `query` | string | Yes | Natural language description of what you're looking for |
| `filters` | object | No | Optional filters: `entityType`, `service`, `tags` (each an array of strings) |
| `size` | integer | No | Number of results to return (default: 10, max: 50) |
| `from` | integer | No | Offset for pagination (default: 0) |
| `cursor` | string | No | Pagination cursor — pass the `nextCursor` value from the previous response to get the next page. Takes precedence over `from` when both are provided. |
| `k` | integer | No | KNN neighbor count for tuning result quality (default: 100) |
| `threshold` | number | No | Minimum similarity score 0.0–1.0 (default: 0.0) |

**Examples**

**Conceptual Search**:

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

**Search with Filters and Threshold**:

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

### company\_context

**Type**: Read

**Description**: Read the question and answer notes extracted from files in the Context Center. Pass `query` to find notes that answer a question, or `fqn` to read one you already have the name of; exactly one of the two. Each result carries the note's title, question, answer, summary, and source file, so a search result is usually enough on its own and needs no follow-up read. `query` needs vector embeddings configured on the server; `fqn` does not.

> [!NOTE]
>
> This tool replaces the earlier separate `search_company_context` and `get_company_context` tools, which no longer exist as of this release.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `query` | string | No | Natural-language question to match notes against. Mutually exclusive with `fqn`. |
| `fqn` | string | No | Fully qualified name of a single note, exactly as a previous result returned it. Mutually exclusive with `query`. |
| `size` | integer | No | Number of notes to return for a `query`. Default is 10, maximum is 50 |
| `from` | integer | No | Offset for pagination (default: 0) |
| `cursor` | string | No | Pagination cursor — pass the `nextCursor` value from the previous response to get the next page. Takes precedence over `from` when both are provided. |

**Example**

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

## Inspect

Retrieve detailed information about a specific entity, with optional business context, lineage, and data-quality sections folded in.

### get\_entity\_details

**Type**: Read

**Description**: Retrieve full details for a specific entity by fully qualified name (FQN), with optional extra sections folded into the same call. If you already have the exact FQN (from a prior search result, or built from known segments using the documented FQN format), pass it directly. If you're not certain of the exact segment values (service, database, schema, or table names as stored in OpenMetadata may differ from source-system names), use `search_metadata` or `semantic_search` first and pass through the `fullyQualifiedName` from the result to avoid a failed lookup. The response includes an `extension` field containing any custom properties defined for the entity type. Pass `entities` instead of `entityType`/`fqn` to read up to 10 entities in one call.

> [!NOTE]
>
> `get_asset_context` and `get_knowledge_content` are no longer separate tools as of this release. Use `include: ["context"]` in place of `get_asset_context`, and `include: ["content"]` in place of `get_knowledge_content`.

**Masked fields**: Credentials stored on an entity come back as `*********` for every caller, including bots. This covers service connection configuration, ingestion pipeline source configuration, automation workflow requests, and alert webhook credentials. A user's authentication mechanism is not returned. A user's email is returned as `********@masked.com` unless the caller is an admin or a bot.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityType` | string | Yes\* | Type of entity (e.g., `table`, `dashboard`, `topic`, `pipeline`). Required unless `entities` is used. |
| `fqn` | string | Yes\* | Fully qualified name, using the exact value from `search_metadata` or `semantic_search` results. Required unless `entities` is used. |
| `entities` | array of string | No | Read several entities in one call instead of `entityType`/`fqn`. Each item is `entityType:fqn`, for example `table:sample_data.ecommerce_db.shopify.dim_address`. Maximum 10 per call. |
| `columnOffset` | integer | No | Zero-based index of the first column to return, for paging through a wide table's columns. Defaults to 0. |
| `columnLimit` | integer | No | Maximum number of columns to return starting at `columnOffset`. |
| `include` | array of string | No | Extra sections to fold into this call instead of a separate one: `context` (business knowledge: approved glossary term definitions and Context Center articles, plus type-specific structural context such as primary/foreign keys, frequent joins, and partitions for tables), `lineage` (immediate upstream/downstream FQNs only; use `get_entity_lineage` for depth or transformation SQL), `quality` (test-suite pass/fail summary, including a `neverRun` count), `content` (full body of a knowledge item, or matching passages when `query` is set). `context` already includes a lineage summary, so combining it with `lineage` returns the same neighbors twice. |
| `query` | string | No | Focuses the `context` and `content` sections on one question. Ignored by the other sections. |
| `format` | string | No | Rendering for the `context` and `content` sections: `markdown` (default) or `json`. |
| `passages` | integer | No | How many passages the `content` section returns when `query` is set (1-10, default 3). |

**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"
    }
  }
}
```

**Get Table Details with Business Context, Lineage, and Data Quality**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "tools/call",
  "params": {
    "name": "get_entity_details",
    "arguments": {
      "entityType": "table",
      "fqn": "mysql_prod.ecommerce.public.customer_orders",
      "include": ["context", "lineage", "quality"]
    }
  }
}
```

**Sample Response**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "## Table: customer_orders\n\n**FQN**: mysql_prod.ecommerce.public.customer_orders\n**Service**: mysql_prod (MySQL)\n**Database**: ecommerce | **Schema**: public\n**Description**: Stores all customer order transactions\n\n**Owners**: ecommerce-team, sarah.johnson@company.com\n**Tags**: PII, Financial, Customer-Data | **Tier**: Tier1\n\n**Columns** (5):\n- order_id (BIGINT) - Primary key\n- customer_id (BIGINT) - FK to customer table\n- order_date (TIMESTAMP)\n- total_amount (DECIMAL)\n- status (VARCHAR)"
      }
    ]
  }
}
```

## Context

Retrieve context knowledge associated with the current user, a persona, or a business question. Context tools are all **Read** operations. For an asset's own business and structural context, use `get_entity_details` with `include: ["context"]` instead.

### get\_user\_context

**Type**: Read

**Description**: Returns context about the currently authenticated user — identity (ID, name, display name, email, admin/bot flags), team memberships, roles (direct and team-inherited), domains, active persona, and lightweight summaries of entities the user owns and follows. Use this to answer identity questions such as "what is my role?" or "what do I own?" before asking the user for details. The user is resolved from the authenticated request — there is no parameter to look up another user.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `includeOwnedSummary` | boolean | No | Include a summary of entities owned by the user and their teams (default: `true`) |
| `includeFollowedSummary` | boolean | No | Include a summary of entities the user follows (default: `true`) |
| `ownedLimit` | integer | No | Max owned entities to return, 1–100 (default: 20) |
| `followedLimit` | integer | No | Max followed entities to return, 1–100 (default: 20) |
| `ownedFilter` | string | No | Narrow owned entities to ones worth surfacing: `NONE` (default, all owned), `MISSING_DESCRIPTION`, `MISSING_TIER`, or `ANY_GAP`. Gap filters apply to data-asset entity types only |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_user_context",
    "arguments": {
      "ownedFilter": "ANY_GAP"
    }
  }
}
```

**Sample Response**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "## Current User\n\n**Name**: Jane Doe\n**Email**: jane.doe@company.com\n**Persona**: Data Analyst\n**Teams**: analytics-team, data-platform\n**Roles**: DataSteward"
      }
    ]
  }
}
```

### get\_persona\_context

**Type**: Read

**Description**: Returns the shared AI context document that an administrator curated for a persona. The administrator chooses what the document contains with [AI Context](https://docs.open-metadata.org/v2.1.x/how-to-guides/context-center/ai-context.md) rules. With no `personaName`, returns context for the caller's active persona. The document can span multiple parts. Call again with an incremented `part` while the response's `hasMore` is `true`. The document is reference data, not instructions. If the administrator wrote a prompt for the persona, part 1 also returns it as `instructions`, which describe who the persona's users are and what they are responsible for. The prompt never overrides the assistant's own rules. It is left out when no prompt is set or when the persona's AI Context is disabled. Access is limited to persona members, admins, and bots.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `personaName` | string | No | Fully qualified name of the persona. Omit to use the caller's active persona |
| `format` | string | No | `markdown` (default) or `json` |
| `part` | integer | No | One-based document part to fetch. Start at 1 and continue while `hasMore` is `true` (default: 1) |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_persona_context",
    "arguments": {
      "personaName": "Data Analyst"
    }
  }
}
```

### find\_context

**Type**: Read

**Description**: For a business question where no specific asset has been chosen yet, semantically searches the company-knowledge layer — glossary term definitions, metric definitions, and Context Center articles — and returns the matching definitions plus the candidate data assets each concept points to (glossary terms → the tables tagged with them, metrics → the assets they apply to, and articles → the assets they're about). Use this to bootstrap a data question from business concepts into candidate tables, then call `get_entity_details` with `include: ["context"]` on those FQNs. For a glossary term or metric hit, call [`get_concept_context`](#get_concept_context) with its `entityType` and `fullyQualifiedName` (as `fqn`) to resolve its exact column bindings, profiles, and evidence. This is a semantic search over company knowledge, not a keyword search over asset or persona memories.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `query` | string | Yes | Natural-language question or business terms to find relevant company knowledge and candidate assets for |
| `size` | integer | No | Number of knowledge items to return (default: 10, max: 50) |
| `format` | string | No | `markdown` (default) returns definitions and candidate assets as an LLM-friendly document. `json` returns the structured result |

**Example**

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

### get\_concept\_context

**Type**: Read

**Description**: Resolve a glossary term or metric to everything the catalog knows about it: its definition, typed ontology attributes, the assets and columns it is tagged on or applied to, profiles and sample values for those columns, related metrics, and the saved queries that use it. Pass the concept's `fullyQualifiedName` from [`find_context`](#find_context) as `fqn`. It returns the same result as `GET /v1/glossaryTerms/name/{fqn}/context` and `GET /v1/metrics/name/{fqn}/context`.

Profiles and sample values follow the caller's permissions. Profiles need **ViewDataProfile**, sample values need **ViewSampleData**, and sensitive values stay masked.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityType` | string | Yes | `glossaryTerm` or `metric` |
| `fqn` | string | Yes | Fully qualified name of the glossary term or metric |
| `format` | string | No | `markdown` (default) or `json` |
| `query` | string | No | A question used to choose which excerpts of attached articles and memories to include |

**Limits**

* Bindings cover at most 10 visible assets and 25 bindings per asset.
* `totalAssets`, `totalBindings`, and `truncated` report what was left out. Counting stops after 500 candidate assets, so totals are lower bounds when `truncated` is `true`.
* Up to 20 saved-query evidence entries are returned, with query text cut at 4,000 characters.
* Attached articles and memories share the same size budget as the other context tools.

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_concept_context",
    "arguments": {
      "entityType": "glossaryTerm",
      "fqn": "Finance.Revenue"
    }
  }
}
```

## Lineage & Impact

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

### get\_entity\_lineage

**Type**: Read

**Description**: Retrieve upstream and downstream lineage for any entity to understand data dependencies and perform impact analysis. Pass the exact `fullyQualifiedName` from search results.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityType` | string | Yes | Type of entity |
| `fqn` | string | Yes | Fully qualified name of the entity |
| `upstreamDepth` | integer | No | Hops to traverse upstream (default: 3, max: 10) |
| `downstreamDepth` | integer | No | Hops to traverse downstream (default: 3, max: 10) |
| `includeColumnLineage` | boolean | No | Include column-level lineage mappings. Default is `false` (table-level only) |
| `column` | string | No | Fully qualified name of one column of this entity. Returns only the edges and column mappings that carry that column, followed hop by hop, including renames. Use it instead of `includeColumnLineage` for single-column questions |
| `cursor` | string | No | Pagination cursor. When a response has `hasMore`, pass its `nextCursor` here with the same other arguments. Omit it for the first page |

**Examples**

**Get Full Lineage**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_entity_lineage",
    "arguments": {
      "entityType": "table",
      "fqn": "mysql_prod.ecommerce.public.sales_transactions",
      "upstreamDepth": 3,
      "downstreamDepth": 3
    }
  }
}
```

**Downstream-Focused Impact Analysis**:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_entity_lineage",
    "arguments": {
      "entityType": "table",
      "fqn": "mysql_prod.ecommerce.public.sales_transactions",
      "upstreamDepth": 1,
      "downstreamDepth": 5
    }
  }
}
```

### create\_lineage

**Type**: Write

**Description**: Create a lineage relationship between two entities. Identify each entity by `fqn` (the fully qualified name a search result already returns) or by `id` (UUID) and `type`. `fqn` is preferred, since it skips the extra lookup an `id` would need.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `fromEntity` | object | Yes | Source entity with `type` (string) and either `fqn` (fully qualified name, preferred) or `id` (UUID string) |
| `toEntity` | object | Yes | Destination entity with `type` (string) and either `fqn` or `id` (UUID string) |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_lineage",
    "arguments": {
      "fromEntity": {
        "type": "table",
        "fqn": "mysql_prod.ecommerce.public.raw_orders"
      },
      "toEntity": {
        "type": "table",
        "fqn": "mysql_prod.ecommerce.public.dim_orders"
      }
    }
  }
}
```

> **Tip**: `search_metadata` and `get_entity_details` results already carry each entity's `fqn` — pass it straight through to `create_lineage` instead of resolving an `id` first.

### root\_cause\_analysis

**Type**: Read

**Description**: Trace a data quality failure back to its origin by traversing data quality lineage across pipeline hops.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `fqn` | string | Yes | FQN of the entity where failure was detected |
| `entityType` | string | Yes | Entity type to analyze (for example, `table`) |
| `upstreamDepth` | integer | No | Hops to traverse upstream (default: 3, max: 10) |
| `downstreamDepth` | integer | No | Hops to traverse downstream (default: 3, max: 10) |
| `queryFilter` | string | No | Optional OpenSearch DSL filter JSON |
| `includeDeleted` | boolean | No | Include deleted entities in traversal (default: false) |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 12,
  "method": "tools/call",
  "params": {
    "name": "root_cause_analysis",
    "arguments": {
      "fqn": "mysql_prod.ecommerce.public.customer_orders",
      "entityType": "table",
      "upstreamDepth": 4,
      "downstreamDepth": 1,
      "includeDeleted": false
    }
  }
}
```

## Create & Modify

Create new entities of any registered type, discover what an entity type requires before creating it, and update existing entities.

> [!NOTE]
>
> `create_glossary`, `create_glossary_term`, `create_context_memory`, `create_classification`, `create_tag`, `create_domain`, `create_data_product`, and `create_metric` are no longer separate tools as of this release. Use `create_entity` with the corresponding `entityType` for all of them.

### create\_entity

**Type**: Write

**Description**: Create a new entity through the repository registered for its entity type. This tool never modifies an existing entity; a name that is already taken fails. Use `patch_entity` for every edit. Fields every type shares are top-level parameters; fields specific to the entity go in `attributes`. Call `describe_entity_type` first when the requirements aren't already known. Reference-valued attributes take an object naming the target, such as `{"type": "glossary", "fullyQualifiedName": "Finance"}`; an `id` may be given instead of the name. Unknown entity types and attributes are rejected before anything is written. Entity types whose resource endpoint performs required authentication, scheduling, specialized authorization, or secret-handling work are rejected with the dedicated API to use instead (users, bots, apps, event subscriptions, ingestion pipelines, test cases, services, and automation workflows). To create a test case use `create_test_case`; for lineage use `create_lineage`. A Context Center article is `entityType: "page"` with `attributes: {"pageType": "Article", "page": {}}`, its markdown body in `description`, the assets it documents in `attributes.relatedEntities`, and an optional `attributes.parent` page to nest it under. Writes take effect immediately, so confirm the target with the user before calling.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityType` | string | Yes | Registered entity type to create, for example `glossary`, `glossaryTerm`, `classification`, `tag`, `domain`, `dataProduct`, `metric`, or `page` for a Context Center article. |
| `name` | string | Yes | Entity name, unique within its parent scope. |
| `description` | string | No | Description of the entity in Markdown. |
| `displayName` | string | No | Human-readable display name. |
| `owners` | array of string | No | User or team names to own the entity, for example `["john.doe", "Data Platform"]`. A name that resolves to neither fails the call. |
| `tags` | array of string | No | Tag FQNs to apply, for example `["PII.Sensitive", "Tier.Tier1"]`. |
| `domains` | array of string | No | Domain FQNs the entity belongs to. |
| `reviewers` | array of string | No | User or team names to review the entity. |
| `extension` | object | No | Custom properties as `{propertyName: value}`. |
| `attributes` | object | No | Fields specific to this `entityType`. Values match the schema returned by `describe_entity_type`. Reference fields use objects such as `{"type": "glossary", "fullyQualifiedName": "Finance"}` or `{"type": "glossary", "id": "<uuid>"}`; arrays of references use arrays of those objects. |

**Examples**

**Create a Glossary** (replaces the former `create_glossary` tool):

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

**Create a Domain** (replaces the former `create_domain` tool):

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

**Create a Context Center Article** (replaces the former `create_context_memory` tool):

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_entity",
    "arguments": {
      "entityType": "page",
      "name": "finance-warehouse-preference",
      "description": "Always query the FINANCE_PROD warehouse for finance dashboards.",
      "domains": ["Finance"],
      "attributes": {
        "pageType": "Article",
        "page": {}
      }
    }
  }
}
```

### describe\_entity\_type

**Type**: Read

**Description**: Return the `attributes` that `create_entity` accepts for one entity type: each field's name, type, whether it's required, and its allowed values. Call this before `create_entity` when the type's requirements aren't already known, rather than guessing attribute names.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityType` | string | Yes | Registered entity type whose create attributes to return. |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "describe_entity_type",
    "arguments": {
      "entityType": "dataProduct"
    }
  }
}
```

### patch\_entity

**Type**: Write

**Description**: Update an existing entity's properties using [JSON Patch](https://jsonpatch.com/) (RFC 6902). Use `get_entity_details` first to retrieve the current state before constructing a patch.

**Service connections**: `patch_entity` cannot change or read a service's `/connection`, because it holds the service's credentials. A patch that targets `/connection`, or the whole document, on a service is rejected with an error and nothing is changed. Use the service's REST API to change connection settings. Other service fields, such as `/description`, can still be patched.

**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` |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "patch_entity",
    "arguments": {
      "entityType": "table",
      "fqn": "mysql_prod.ecommerce.public.customer_orders",
      "patch": "[{\"op\":\"replace\",\"path\":\"/description\",\"value\":\"Updated description for customer orders table.\"}]"
    }
  }
}
```

## Data Quality

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

### get\_test\_definitions

**Type**: Read

**Description**: List test definitions available in OpenMetadata for tables or columns. Call this before `create_test_case` to identify valid test types and their required parameters.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityType` | string | Yes | `TABLE` for table-level tests or `COLUMN` for column-level tests |
| `limit` | integer | No | Max results to return (default: 10) |
| `cursor` | string | No | Pagination cursor — pass the `nextCursor` value from the previous response to get the next page. Preferred over `after`. |
| `after` | string | No | Legacy pagination token, equivalent to `cursor`. Prefer `cursor` for new integrations. |
| `testPlatform` | string | No | Filter by platform: `OpenMetadata`, `GreatExpectations`, `DBT`, `Deequ`, `Soda`, `Other` (default: `OpenMetadata`) |

**Example**

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

### create\_test\_case

**Type**: Write

**Description**: Create a data quality test case for a table or column. For column tests, ensure the column's data type is listed in the test definition's `supportedDataTypes`.

**Parameters**

| Parameter | Type | Required | Description |
| - | - | - | - |
| `name` | string | Yes | Name of the test case |
| `fqn` | string | Yes | FQN of the target entity (typically the table FQN) |
| `testDefinitionName` | string | Yes | Name of the test definition returned by `get_test_definitions` |
| `parameterValues` | array | Yes | List of test parameter objects (`name` + `value`) required by the test definition |
| `columnName` | string | No | Column name for column-level test cases |
| `entityType` | string | No | Target OpenMetadata entity type (default: `table`). For column-level tests, keep `entityType` as `table` and set `columnName`. |
| `description` | string | No | Optional description of the test case |

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 11,
  "method": "tools/call",
  "params": {
    "name": "create_test_case",
    "arguments": {
      "name": "customer_id_not_null",
      "fqn": "mysql_prod.ecommerce.public.customer_orders",
      "columnName": "customer_id",
      "entityType": "table",
      "testDefinitionName": "columnValuesToBeNotNull",
      "description": "Ensures customer_id is always populated for downstream joins",
      "parameterValues": []
    }
  }
}
```

## Knowledge Graph

Traverse the RDF knowledge graph directly. See [Ontology & Knowledge Graph for AI Agents](https://docs.open-metadata.org/v2.1.x/how-to-guides/ontology/ai-agents.md) for recipes and prompting guidance.

> [!NOTE]
>
> **Availability and access.** `sparql_query`, `entity_neighborhood`, `find_by_tag`, and `ontology_describe` called with a `resource` require the **ExecuteSparqlQuery** permission. Administrators have it, and so do non-admin users and bots that hold it. The Data Consumer policy grants it by default through `DataConsumerPolicy-ExecuteSparqlQuery-Rule`.
>
> * `ontology_describe` without a `resource` needs no permission.
> * `shacl_validate` remains administrator-only and returns 403 for everyone else.
> * Four of the five tools (`sparql_query`, `entity_neighborhood`, `find_by_tag`, `shacl_validate`) are **not advertised at all** when RDF is disabled, so a client never sees a tool it cannot call.
> * `ontology_describe` is always advertised because its default path serves the bundled ontology document from the classpath.
> * A tool returns 429 while the knowledge graph is being rebuilt, and 400 when it is degraded.
>
> Non-administrators run `sparql_query` through a restricted read-only profile with these limits:
>
> * `SELECT` queries only.
> * JSON output only.
> * No inference.
> * No `FROM`, `GRAPH`, `SERVICE`, or `CALL`.
> * Bounded result size and runtime.
>
> See [Enable RDF (Knowledge Graph)](https://docs.open-metadata.org/v2.1.x/deployment/rdf-knowledge-graph.md).

> [!WARNING]
>
> Results from these tools are **not filtered by asset or domain policies**. If you restrict who can view assets through custom policies or domains, remove `DataConsumerPolicy-ExecuteSparqlQuery-Rule` from the Data Consumer policy so ordinary users and bots can't read the graph. Removal can take effect late for principals that are already connected over MCP.

### sparql\_query

**Read** — Run a read-only SPARQL query (`SELECT`, `ASK`, `DESCRIBE`, `CONSTRUCT`) against the knowledge graph. Use this when the question is graph-shaped: *"all tables with FK references into customers.id"*, *"all upstream tables of dashboard X"*, *"columns tagged PII whose null count > 0"*.

`UPDATE` / `INSERT` / `DELETE` / `DROP` / `LOAD` / `CLEAR` / `CREATE` are rejected. `SERVICE` clauses against external endpoints are rejected unless the target is on the federation allowlist, which is empty and disabled by default.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `query` | string | Yes | The SPARQL query. Use `https://open-metadata.org/ontology/` as the `om:` prefix |
| `format` | string | No | `SELECT`/`ASK`: `json` (default), `xml`, `csv`, `tsv`. `CONSTRUCT`/`DESCRIBE`: `turtle`, `jsonld`, `ntriples`, `rdfxml` |
| `inferenceLevel` | string | No | Reasoning applied at query time: `none` (default), or `custom` when materialized inference is enabled. `rdfs` and `owl` fail with a 503 error |
| `maxBytes` | integer | No | Response body cap. Default and maximum 80000; minimum 1024 |

A `truncated: true` flag plus `byteCount` appears when the body does not fit — narrow the query with `LIMIT` rather than raising `maxBytes`, which is clamped. An `rdfs` or `owl` request fails instead of returning un-inferred results, and so does `custom` when materialized inference is off.

**Example**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 11,
  "method": "tools/call",
  "params": {
    "name": "sparql_query",
    "arguments": {
      "query": "PREFIX om: <https://open-metadata.org/ontology/> SELECT ?fqn WHERE { GRAPH <https://open-metadata.org/graph/knowledge> { ?t a om:Table ; om:fullyQualifiedName ?fqn ; om:hasTag ?tag . FILTER(CONTAINS(STR(?tag), \"PII\")) } } LIMIT 50",
      "format": "json"
    }
  }
}
```

### entity\_neighborhood

**Read** — Return the *n*-hop instance-data neighborhood of an entity: `hasColumn`, `belongsToSchema`, `hasTag`, owners, lineage, and so on. Ontology and SHACL definition graphs are excluded so schema triples do not consume result slots.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityId` | string | Yes | UUID of the entity (the `id` field) |
| `entityType` | string | Yes | Entity type, singular (`table`, `dashboard`, `pipeline`, `glossaryTerm`, …) |
| `depth` | integer | No | Hop depth, 1–3. Default 2 |
| `limit` | integer | No | Solution rows **per traversal branch share**, not a triple count. Default 200, max 2000 |

Returns the full 1..depth-hop subgraph as Turtle in `triples`, plus an `edges` array that is a flat **direct (1-hop) adjacency summary of the start entity only**. For second- and third-hop traversal, parse `triples`, not `edges`.

### find\_by\_tag

**Read** — Find every entity tagged with a classification tag or glossary term, walking `om:hasTag` and `om:hasGlossaryTerm`. Paginated.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `tagFqn` | string | Yes | FQN of the tag or glossary term, e.g. `PII.Sensitive`, `BusinessTerms.Customer` |
| `entityType` | string | No | Restrict results to a single entity type |
| `limit` | integer | No | Default 50, max 500 |
| `offset` | integer | No | Page offset. Default 0 |

### shacl\_validate

**Read** — Run SHACL validation against a single entity's subgraph or the entire dataset. Returns `conforms`, `violationCount`, and the SHACL `ValidationReport`. Read-only; never blocks writes.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityId` | string | No | UUID of the entity to scope validation to |
| `entityType` | string | No | Entity type, singular. Required if `entityId` is provided |
| `entityUri` | string | No | Alternative to `entityId` + `entityType`: the full entity URI |
| `fullGraph` | boolean | No | Must be `true` to validate the whole dataset when no entity scope is given. Default `false` |
| `format` | string | No | `turtle` (default) or `jsonld` |
| `maxBytes` | integer | No | Report body cap. Default and maximum 80000; minimum 1024 |

`conforms` and `violationCount` are always returned in full, even when the report body is truncated.

### ontology\_describe

**Read** — Return the OpenMetadata ontology: the full canonical document, or a SPARQL `DESCRIBE` for a single class or property URI. Use it to discover the classes, properties, ranges, and domains available before writing a query.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `resource` | string | No | Full URI of the class or property to describe, e.g. `https://open-metadata.org/ontology/Column`. Omit for the full ontology |
| `format` | string | No | `turtle` (default), `jsonld`, `ntriples`, `rdfxml` |
| `maxBytes` | integer | No | Body cap. Default and maximum 80000; minimum 1024 |

The full ontology is roughly 65 KB, so prefer passing `resource` for a focused `DESCRIBE`.

> [!TIP]
>
> Make this the agent's **first** call before any SPARQL. An LLM asked to query an unfamiliar schema will invent predicate names that sound right and get zero rows with no error; one `ontology_describe` call replaces that guessing with the actual declarations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.