Skip to main content

Query Items Tool

Configure the Query items tool to retrieve records from a list or report, then check filters, field selection, pagination, and access.

Use Query items when an AI Agent needs to read records from an application. For example, it can look up active stock items, return their item codes and quantities, and pass those records to another tool.


1. Accessing the Tool Management Panel

  1. Open the AI Agent you want to configure and select Tools in the top navigation. From here you can add, edit, enable, disable, or delete tools.


2. Adding the Query items Tool

Select Add a tool, then choose Query items.

1. Choose application

Select the application that contains the data you want the agent to read.

2. Data source

Select the list or report to query. Choose Add to create the tool, or Add and configure to open its settings.


3. General Settings

Open the settings with Add and configure, or use … → Edit on an existing tool.


(1) Detail Settings

Detail settings define the tool’s basic information, associated data source, and credential mode.

Setting

Description

Name

Name of the tool (≤100 characters). Default is the tool type, but can be customized.

Description

Description explaining the tool’s purpose (≤2500 characters) to help the AI understand how to use it.

Tool

Displays the tool type (read-only), e.g., Query items.

Application

The selected application. You can open it in a new window using the link icon.

Data source

The selected list or report. You can open it for review.

Credentials to use

Defines which user identity is used when executing the query.

Credential Options

Credential Mode

Description

End user credentials

Executes the query using the identity of the AI end user. If the user lacks list permissions, the AI will receive an access error.

Specific user

Executes the query as a specific user. If the selected user lacks access, the tool will fail.


(2) Inputs Settings

Check Input name, Input type, Fill using, and Value for each input. Use Dynamically fill with AI for values that come from the request, or Custom value for configured rules and values. Compare the input options


1. Data filter

This optional Text input determines which records match. Let AI build the conditions from the request, or use Customize to set conditions in the editor.


2. Fields

This optional Text input controls which fields appear in the results. Select Setting, then check only the fields the agent needs. You can select each field once, use Sort to change the field order, and use Display Name to label returned fields.


3. Sorts

This optional Text input sets record order. Choose a primary field and direction. Add a secondary field, such as an item code, if records can share the primary value and you need predictable order.


4. Page number

Use this optional Number input to request a specific page. You can enter a number or use an expression.


5. Page size

Use this optional Number input to set how many records can be returned on a page.


(3) Completion Settings

Set how the agent continues after the query and which outputs other tools can use.


1. After running

Option

Description

Do not respond

The agent does not wait for the tool's result. Useful when no data is needed afterward.

Waiting for response (default)

The agent waits for the tool to finish executing and uses the returned data.


2. Outputs available to the agent and other tools

Defines which outputs the AI Agent and other tools can access.

Available outputs for Query items:

Output

Output type

Description

Data

List

The queried data records. Can be customized to adjust field structure.

Message

Text

Execution message such as success or error details.

Status Code

Number

HTTP-like status code (e.g., 200, 400).

Total Count

Number

Total number of records matching the query.

Additional outputs can be added using Add output.

Query items output reference. Data is a List, Message is Text, and Status Code and Total Count are Number. Select Customize to adjust an output.


4. Summary

  1. In a test application, use a filter with three known matching records. Select only the fields the agent needs, choose a predictable sort order, and set Page size to 2.

  2. Request the first and second pages. Check that Data returns two records and then one, includes only the selected fields, and maintains the chosen order. Total Count should be 3 on both requests.

  3. Run a filter with no matches. If you use End user credentials, also try the query as a user without access and check how the agent handles the access error.

The same Details, Inputs, and Completion sections appear on other tools, such as Add an item and Run an agent. AI Agent settings

Did this answer your question?