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 |
Required. The project ID to which the request should be attributed. |
location |
Required. The location to which the request should be attributed. All resources specified in the |
resources[] |
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 The resource name must be in the following format: Example for a BigQuery table: This name is typically obtained from the |
Output Schema
Lookup Context response.
LookupContextResponse
| JSON representation |
|---|
{ "context": string } |
| Fields | |
|---|---|
context |
LLM Context for the requested resources. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ✅