Configuring the tool
When you add the Query tool to your agent in the Agent builder, configure the following settings.| Setting | Description |
|---|---|
| Tool name | A name that identifies the tool’s purpose. |
| Tool instructions | Instructions that tell the agent when to use this tool and how to choose data modeling views, filters, and limits. |
Data models
The data models setting controls which data models the agent can query.| Setting | Description |
|---|---|
| Defined by user’s location | The tool uses the data models for your selected location filter. This is the default. |
| Configure manually | You provide a fixed list of data models. For each model, you can fill in the Views fields to limit discovery to specific views. If you leave Views empty, discovery includes every view in that data model. |
Instance spaces
Spaces organize data into separate, access-controlled partitions. The instance spaces setting controls which spaces the Query tool can read from.| Setting | Description |
|---|---|
| Inherit scope based on user’s location | The tool reads from the instance spaces for your selected location filter. This is the default. |
| Inherit scope based on user’s access rights in CDF | The tool reads from every space you can access in CDF. |
| Follow access scope defined manually | You specify exactly which spaces the tool can read from. |
Operations
The following table describes the operations available in the Query tool.| Operation | What it does |
|---|---|
list_views | Discovers which data modeling views the agent can query. |
get_view_schema | Returns the fields and relations a data modeling view contains. |
get_filter_docs | Returns help text for writing correct filters. |
list_instances | Retrieves instances from one data modeling view. |
search_instances | Finds instances in one data modeling view that match a text query. |
aggregate_instances | Counts and summarizes data in one data modeling view without listing every instance. |
retrieve_instances | Fetches specific instances when the agent already knows the instance space and external ID. |
Combining tools
To complete tasks that include multiple data types, use the Query tool with other tools from the Agent tools library.| Tool | When to use |
|---|---|
| Query time series data points | Use the Query tool to identify a time series, then pass its ID to this tool to retrieve data points. |
| Answer document questions | Use the Query tool to find and retrieve files, then use this tool to answer questions from their contents. |
| Summarize documents | Use the Query tool to retrieve specific files, then use this tool to generate a summary of their contents. |