docs/en/integrations/knowledge-catalog/tools/knowledge-catalog-lookup-context.md
A dataplex-lookup-context tool provides rich metadata of one or more data assets along with their relationships.
dataplex-lookup-context takes a required resources parameter which is a list of up to 10 resource names for which metadata is needed in the following form: projects/{project}/locations/{location}/entryGroups/{group}/entries/{entry}. All resources must belong to the same Google Cloud location.
{{< compatible-sources >}}
Knowledge Catalog (formerly known as Dataplex) uses Identity and Access Management (IAM) to control user and group access to Knowledge Catalog resources. Toolbox will use your Application Default Credentials (ADC) to authorize and authenticate when interacting with Knowledge Catalog.
In addition to setting the ADC for your server, you need to ensure the IAM identity has been given the correct IAM permissions for the tasks you intend to perform. See Knowledge Catalog IAM permissions and Knowledge Catalog IAM roles for more information on applying IAM permissions and roles to an identity.
Note on Lookup Context Tool Behavior: This specific tool utilizes a post-filtering approach for authorization. This means that any authenticated user can call the tool's API endpoint. However, the response will only contain data for resources that the caller's identity (via ADC) has the necessary IAM permissions to access. If the caller has no permissions on the requested resources, the tool will return an empty response rather than an access denied error.
The dataplex-lookup-context tool accepts the following parameters:
| field | type | required | description |
|---|---|---|---|
| resources | list of strings | true | A list of up to 10 resource names for which metadata is needed (format: projects/{project}/locations/{location}/entryGroups/{group}/entries/{entry}). |
kind: tool
name: lookup_context
type: dataplex-lookup-context
source: my-dataplex-source
description: Use this tool to retrieve rich metadata regarding one or more data assets along with their relationships.
| field | type | required | description |
|---|---|---|---|
| type | string | true | Must be "dataplex-lookup-context". |
| source | string | true | Name of the source the tool should execute on. |
| description | string | true | Description of the tool that is passed to the LLM. |