Why query instead of calling the provider
A query is billed like an action call. Listing queryable fields is not.
Smaller responses, fewer tokens
The last two rows are where an agent gains the most. Asking for three fields instead of forty shrinks the response the model has to read by the same proportion. Asking for a headcount by department returns a dozen numbers from one aggregation, where a live call means paging through every employee record and tallying them inside the context window. Deep Query and Advanced Tool Search work on the same budget from opposite ends: one shrinks what tool responses cost, the other shrinks what tool definitions cost.Which actions can sync
Deep Query covers any action with a sync turned on. An action can sync when its connector defines a sync for it. Actions that need parameters to run, such as fetching one record by ID, can’t. To see which actions can, open the connector in Connectors and select Library: actions that support Data Sync carry the sync icon. Turn sync on for the action in a Connector Profile first, as described in Data Sync.Query from an agent
Once a sync has records, each synced action gains a companion tool named{action}_s1query, such as bamboohr_list_employees_s1query alongside bamboohr_list_employees. A list_s1query_queryable_fields tool tells the agent which fields it can filter and sort on. With Advanced Tool Search, search returns the _s1query entry just before the live action it copies, and the execute tool runs either one.
Both tools stay available, so the agent chooses: the Deep Query tool to search or aggregate across everything cheaply, the live tool when it needs the provider’s current state.
Records come back as the provider returned them to Data Sync, with the provider’s field names and nesting, which can differ from the live action’s result.
Tool Policies apply to Deep Query reads the same way they apply to live action calls.
Try a query without code
Open Actions Request Tester from the account page and pick the(S1Query) entry for the action.
When to use it
Use Deep Query when the same data is read repeatedly and can be as old as the last sync run, or when an agent needs to search or aggregate across the whole record set rather than page through it. For data that has to reflect the provider right now, call the action directly. Both tools stay available to the agent. To be told when a synced record changes rather than querying for it, turn on Data Sync events.Data Sync
Turn on the sync that Deep Query reads from, and set how often it refreshes.
Query from your own code
For developers querying the index from their own backend, with filters and aggregations.