# Deep Query

> Deep Query answers counts, filters and totals from a synced copy of a list action, so the agent gets one result instead of paging through every record. Data Sync keeps the copy fresh, and the agent calls the matching _s1query tool with a filter, the fields it needs and any aggregation.

33% to 74% fewer tokens per connector across 1,345 benchmark tasks; 0.3 s per read against 2.9 s per live call in production. ([source](https://www.stackone.com/platform/deep-query/#benchmark))

Family: Query instead of paging. A StackOne feature.

## Where it fits
- **Building my own agent**: fits. Call the _s1query tool over MCP or the API. With StackOne: Data Sync on the list action, then list_tickets_s1query({ filter, source, aggs }).
- **Using a coding agent**: fits. Through the Tool Gateway MCP. With StackOne: Add https://mcp.stackone.com/mcp, then ask in plain words.
- **Using an enterprise assistant**: fits. Through the Tool Gateway MCP. With StackOne: Add https://mcp.stackone.com/mcp as one MCP server.
- **Using a workflow tool**: partly (not confirmed). n8n's MCP Client Tool; Zapier and Make not confirmed. With StackOne: MCP Client Tool pointed at https://mcp.stackone.com/mcp.

## The setting in each harness

## Read more
- [Deep Query in the StackOne docs](https://docs.stackone.com/optimize/deep-query)
- [How to reduce AI agent token usage on large datasets](https://www.stackone.com/blog/reduce-ai-agent-token-usage/)
