MCP Tools Reference: dataplex.googleapis.com

Tool: lookup_context

Looks up rich, LLM-ready metadata context for the specified resources.

This method is designed to be called after SearchEntries to retrieve detailed information about the search results. The returned context is a pre-formatted string (typically YAML) that is optimized for LLM consumption. It contains comprehensive metadata, including: - Resource details (name, type, description, labels, timestamps). - Detailed schema information (field names, types, descriptions, and optionally statistics like null ratio, distinct values, sample values). - Data quality status. - Usage statistics and patterns (e.g., top read/filter/sort fields). - Related resources (ancestors, linked entries). - Detected joins between resources. - Sample SQL queries.

Use this tool to understand the structure and context of data assets before performing operations on them or answering user questions about them.

When to use LookupEntry vs LookupContext: - Use LookupContext (recommended for general LLM reasoning) when you need a pre-formatted, easy-to-read YAML summary of the resource's metadata, schema, and quality to answer user questions or plan queries. - Use LookupEntry when you need to programmatically inspect the raw structure, retrieve specific raw aspect payloads, or prepare to update aspects.

The following sample demonstrate how to use curl to invoke the lookup_context MCP tool.

Curl Request
                  
curl --location 'https://dataplex.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "lookup_context",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

Lookup Context using permissions in the source system.

LookupContextRequest

JSON representation
{
  "projectId": string,
  "location": string,
  "resources": [
    string
  ]
}
Fields
projectId

string

Required. The project ID to which the request should be attributed.

location

string

Required. The location to which the request should be attributed. All resources specified in the resources field must belong to this location. Currently, "global" or regional locations (e.g., "us-central1") are supported.

resources[]

string

Required. A list of up to 10 resource names to look up context for. All resources must belong to the same location as specified in the location field.

The resource name must be in the following format: projects/{project_id_or_number}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}

Example for a BigQuery table: projects/{project_id_or_number}/locations/{location}/entryGroups/@bigquery/entries/bigquery.googleapis.com/projects/{project_id}/datasets/{dataset_id}/tables/{table_id}

This name is typically obtained from the dataplexEntry.name field in the response of a SearchEntries call.

Output Schema

Lookup Context response.

LookupContextResponse

JSON representation
{
  "context": string
}
Fields
context

string

LLM Context for the requested resources.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ✅