Tool: search_lineage
Performs a breadth-first search (upstream or downstream) to retrieve lineage links for an asset identified by its Fully Qualified Name (FQN). Supports Column-Level Lineage (CLL), including wildcards to retrieve all CLL for an entity FQN.
The search_lineage method also retrieves link-creating processes if max_process_per_link is not zero and links.processes.process is requested in the FieldMask.
Required project permissions for stored links and processes are as follows:
- datalineage.events.get for links stored for entity-level lineage
- datalineage.events.getFields for links stored for column-level lineage
- datalineage.processes.get for processes.
The following sample demonstrate how to use curl to invoke the search_lineage MCP tool.
| Curl Request |
|---|
curl --location 'https://datalineage.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "search_lineage", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for SearchLineageStreaming.
SearchLineageStreamingRequest
| JSON representation |
|---|
{ "parent": string, "locations": [ string ], "rootCriteria": { object ( |
| Fields | |
|---|---|
parent |
Required. The project and location to initiate the search from. |
locations[] |
Required. The locations to search in. This list should contain the location from the |
rootCriteria |
Required. Criteria for the root of the search. |
direction |
Required. Direction of the search. |
filters |
Optional. Filters for the search. |
limits |
Optional. Limits for the search. |
RootCriteria
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field criteria. Criteria for the root of the search. criteria can be only one of the following: |
|
entities |
Optional. The entities to initiate the search from. Entities can be specified by FQN only, or by FQN and field. To search by FQN and all available fields for that FQN, use the wildcard |
MultipleEntityReference
| JSON representation |
|---|
{
"entities": [
{
object ( |
| Fields | |
|---|---|
entities[] |
Optional. The list of entities to search for links. The maximum number of entities is 20. |
EntityReference
| JSON representation |
|---|
{ "fullyQualifiedName": string, "field": [ string ] } |
| Fields | |
|---|---|
fullyQualifiedName |
Required. Fully Qualified Name (FQN) of the entity. |
field[] |
Optional. Field path within the entity. Each nesting level should be a separate value in the repeated field. The order matters. Must be empty for asset level lineage For example to address "salary.net" subfield where "salary" is a column and "net" is a proto field two values in the Each field length is limited to 500 characters. Maximum supported nesting level is 20. |
SearchFilters
| JSON representation |
|---|
{ "dependencyTypes": [ enum ( |
| Fields | |
|---|---|
dependencyTypes[] |
Optional. Types of dependencies between entities to retrieve. If unspecified, all dependency types are returned. |
entitySet |
Optional. Entity set restriction. If unspecified, the method returns all entities. |
timeRange |
Optional. Time interval to search for lineage. If unspecified, all lineage is returned. Currently, at most one of |
Interval
| JSON representation |
|---|
{ "startTime": string, "endTime": string } |
| Fields | |
|---|---|
startTime |
Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
SearchLimits
| JSON representation |
|---|
{ "maxDepth": integer, "maxResults": integer, "maxProcessPerLink": integer } |
| Fields | |
|---|---|
maxDepth |
Optional. The maximum depth of the search. The default value is 5 and maximum value is 100. |
maxResults |
Optional. The maximum number of links to return in the response. The default value is 1_000 and the maximum value is 10_000. |
maxProcessPerLink |
Optional. The maximum number of processes to return per link. The default value is 0 and the maximum value is 100. If this value is non-zero, the response will contain process names for the links. To retrieve full process details in the response, include |
SearchDirection
Direction of the search.
| Enums | |
|---|---|
SEARCH_DIRECTION_UNSPECIFIED |
Direction is unspecified. |
DOWNSTREAM |
Retrieve links that lead from the specified asset to downstream assets. |
UPSTREAM |
Retrieve links that lead from upstream assets to the specified asset. |
DependencyType
Type of dependency between entities.
| Enums | |
|---|---|
DEPENDENCY_TYPE_UNSPECIFIED |
Dependency type unspecified. |
EXACT_COPY |
Exact data copy without any change. |
OTHER |
Other types of dependencies like filtering or grouping. |
EntitySet
Entity set restriction.
| Enums | |
|---|---|
ENTITY_SET_UNSPECIFIED |
The entity set is unspecified. Returns all the data. |
ENTITIES |
Returns entities with only FQN specified. For example, entities with the field field set are not returned. |
Output Schema
Response message for SearchLineageStreaming.
SearchLineageStreamingResponse
| JSON representation |
|---|
{
"links": [
{
object ( |
| Fields | |
|---|---|
links[] |
Output only. The lineage links that match the search criteria. Can be empty if no links match. |
unreachable[] |
Unordered list. Unreachable resources. If non-empty, the result set might be incomplete. Currently, only locations are supported. Format: |
LineageLink
| JSON representation |
|---|
{ "source": { object ( |
| Fields | |
|---|---|
source |
The entity that is the source of this link. |
target |
The entity that is the target of this link. |
processes[] |
Processes metadata associated with the link. |
dependencyInfo[] |
Describes how the target entity is dependent on the source entity. |
depth |
Depth of the current link in the graph starting from 1. |
location |
The location where the LineageEvent that created the link is stored. |
EntityReference
| JSON representation |
|---|
{ "fullyQualifiedName": string, "field": [ string ] } |
| Fields | |
|---|---|
fullyQualifiedName |
Required. Fully Qualified Name (FQN) of the entity. |
field[] |
Optional. Field path within the entity. Each nesting level should be a separate value in the repeated field. The order matters. Must be empty for asset level lineage For example to address "salary.net" subfield where "salary" is a column and "net" is a proto field two values in the Each field length is limited to 500 characters. Maximum supported nesting level is 20. |
LineageProcess
| JSON representation |
|---|
{
"process": {
object ( |
| Fields | |
|---|---|
process |
Process that created the link. |
Process
| JSON representation |
|---|
{
"name": string,
"displayName": string,
"attributes": {
string: value,
...
},
"origin": {
object ( |
| Fields | |
|---|---|
name |
Immutable. The resource name of the lineage process. Format: |
displayName |
Optional. A human-readable name you can set to display in a user interface. Must be not longer than 200 characters and only contain UTF-8 letters or numbers, spaces or characters like |
attributes |
Optional. The attributes of the process. Should only be used for the purpose of non-semantic management (classifying, describing or labeling the process). Up to 100 attributes are allowed. An object containing a list of |
origin |
Optional. The origin of this process and its runs and lineage events. |
AttributesEntry
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
Value
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field kind. The kind of value. kind can be only one of the following: |
|
nullValue |
Represents a JSON |
numberValue |
Represents a JSON number. Must not be |
stringValue |
Represents a JSON string. |
boolValue |
Represents a JSON boolean ( |
structValue |
Represents a JSON object. |
listValue |
Represents a JSON array. |
Struct
| JSON representation |
|---|
{ "fields": { string: value, ... } } |
| Fields | |
|---|---|
fields |
Unordered map of dynamically typed values. An object containing a list of |
FieldsEntry
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
ListValue
| JSON representation |
|---|
{ "values": [ value ] } |
| Fields | |
|---|---|
values[] |
Repeated field of dynamically typed values. |
Origin
| JSON representation |
|---|
{
"sourceType": enum ( |
| Fields | |
|---|---|
sourceType |
Type of the source. Use of a source_type other than |
name |
If the source_type isn't CUSTOM, the value of this field should be a Google Cloud resource name of the system, which reports lineage. The project and location parts of the resource name must match the project and location of the lineage resource being created. Examples:
|
DependencyInfo
| JSON representation |
|---|
{
"dependencyType": enum ( |
| Fields | |
|---|---|
dependencyType |
The type of dependency. |
NullValue
Represents a JSON null.
NullValue is a sentinel, using an enum with only one value to represent the null value for the Value type union.
A field of type NullValue with any value other than 0 is considered invalid. Most ProtoJSON serializers will emit a Value with a null_value set as a JSON null regardless of the integer value, and so will round trip to a 0 value.
| Enums | |
|---|---|
NULL_VALUE |
Null value. |
SourceType
Type of the source of a process.
| Enums | |
|---|---|
SOURCE_TYPE_UNSPECIFIED |
Source is Unspecified |
CUSTOM |
A custom source |
BIGQUERY |
BigQuery |
DATA_FUSION |
Data Fusion |
COMPOSER |
Composer |
LOOKER_STUDIO |
Looker Studio |
DATAPROC |
Dataproc |
VERTEX_AI |
Vertex AI |
DATAFLOW |
Dataflow |
LOOKER_CORE |
Looker Core |
DependencyType
Type of dependency between entities.
| Enums | |
|---|---|
DEPENDENCY_TYPE_UNSPECIFIED |
Dependency type unspecified. |
EXACT_COPY |
Exact data copy without any change. |
OTHER |
Other types of dependencies like filtering or grouping. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌