Configuring the tool
When you add the Query tool to your agent in the Agent builder, configure these settings.
You must also configure data models and instance spaces.
Data models
The data models setting controls which data models the agent can query.Instance spaces
Spaces organize data into separate, access-controlled partitions. The instance spaces setting controls which spaces the Query tool can read from.Operations
This table describes the operations available in the Query tool.Example queries
This table shows how different question types map to Query tool operations. Understanding this mapping helps you write skills and instructions that guide the agent to the right operation.Filtering, aggregation, and sorting
The Query tool supports server-side filtering, aggregation, and sorting. Configuring your skills to use these capabilities keeps queries fast and results focused. Useaggregate_instances when a question asks for a count, total, or grouped summary. For example, use a server-side aggregation to answer “How many overdue work orders are there by site?” rather than listing all work orders and counting them. Skills can reinforce this by including a vocabulary mapping: when the user asks “how many,” use aggregate_instances.
Use filters to narrow results before returning them. A question like “Show me all high-priority work orders from the last 30 days” should apply both a priority filter and a date filter in the query rather than retrieving all records and filtering afterward.