Skip to main content Announcing Tool Gateway MCP: the universal MCPRead the announcement

Deep Query for AI agents. Faster, cheaper answers from your business data.

Deep Query lets AI agents filter, search and aggregate records kept by StackOne Data Sync, in under a second. The agent gets only the counts and fields it needs, without a call to the source API.

Your agent
What's the average base salary by department in New York?

Querying synced records

list_s1query_queryable_fields SAP SuccessFactors user fields
sapsuccessfactors_list_users_s1query 6,150 records → 6 averages

Average base salary across 6,150 New York employees:

Engineering$168,000
Product$165,714
Sales$129,400
Finance$119,500
People$111,857
Support$70,500

1 query · 6 averages · no provider API call · 4,708 tokens per run

Ask your agent...

Companies already connected through StackOne

Deep Query use cases. Get the records and totals
your task needs.

Deep Query filters and counts synced records inside StackOne and sends your agent only the result, cutting the tokens a task uses by up to 99.9%.

Pick an example

What's the average base salary by department in New York?

SAP SuccessFactors users 30,000 synced employees6,150 match location: New York6 department averages

Engineering $168,000 Support $70,500 People $111,857 Product $165,714 Finance $119,500 Sales $129,400
{
  "filter": {"term": {"location": "New York"}},
  "aggs": {
    "by_department": {
      "terms": {"field": "department"},
      "aggs": {"average": {"avg": {"field": "salary"}}}
    }
  }
}

    Then the agent groups the 6,150 records by department and averages salary for each group itself.

    Engineering has the highest average base salary in New York at $168,000, and Support the lowest at $70,500.

    Returned by sapsuccessfactors_list_users_s1query

    [
      {
        "key": "Engineering",
        "doc_count": 1200,
        "average": {
          "value": 168000
        }
      },
      {
        "key": "Support",
        "doc_count": 1200,
        "average": {
          "value": 70500
        }
      },
      {
        "key": "People",
        "doc_count": 1050,
        "average": {
          "value": 111857
        }
      },
      {
        "key": "Product",
        "doc_count": 1050,
        "average": {
          "value": 165714
        }
      },
      {
        "key": "Finance",
        "doc_count": 900,
        "average": {
          "value": 119500
        }
      },
      {
        "key": "Sales",
        "doc_count": 750,
        "average": {
          "value": 129400
        }
      }
    ]

    Faster tool responses. Read synced data
    without waiting on the source API.

    Deep Query reads records already stored in StackOne, so your agent gets an answer even while a provider's API is slow or rate-limited.

    Live lookup0.2 to 12.7 s
    Agent Provider APIAnswer
    Deep Query About 0.2 s
    Agent Synced recordsAnswer

    A live lookup waits 0.2 to 12.7 seconds for the provider API to answer. Deep Query reads the synced records in about 0.2 seconds.

    Configure Data Sync. Set how often Data Sync
    refreshes your records.

    Choose which actions to sync and set a schedule for each one. Deep Query reads those stored records, so the schedule sets how fresh its results are.

    Follow the Data Sync setup guide

    01Pick an actionOpen a Connector Profile and find a list action that supports sync.

    WorkdayProfile · HR agent

    02Enable Data SyncSelect the sync icon and switch Data Sync on for that action.

    Data Sync· List WorkersOptimize

    Setup

    Enable Data Sync

    Preferences

    Sync every 1 hour
    Full re-sync 1 day
    Save Changes

    03Set the scheduleChoose how often new and changed records sync, and how often a full re-sync runs.

    Data Sync· List WorkersOptimize

    Setup

    Enable Data Sync

    Preferences

    Sync every 1 hour
    Full re-sync 1 day
    Save Changes

    04SaveSave the profile to start syncing.

    Data Sync· List WorkersOptimize

    Setup

    Enable Data Sync

    Preferences

    Sync every 1 hour
    Full re-sync 1 day
    Save Changes Data Sync saved

    05StackOne syncsStackOne pages through the provider API on your schedule and keeps the records current.

    Workday API
    Synced records7,200
    • Full sync7,200 records
    • Incremental38 changed
    • Incremental12 changed

    06Your agent queriesThe action's query tool is ready over MCP to filter, search and aggregate.

    How many active employees are in each US department?

    workday_list_workers_s1query1 query

    filter: status active, country US
    aggs:   terms department

    2,400 active employees in the US, 510 of them in Product.

    Sync any list action, including your own.

    An action declares Data Sync in its connector's YAML before anyone can turn it on. StackOne's connectors declare it for common records. In your own connector, you choose. Edit the block to see how it changes each sync run and the tool your agent gets.

    workday.workers.s1.partial.yaml
    Tab indents. Press Escape, then Tab, to leave the editor.

    Valid. The action offers Data Sync.

    In the Connector Profile1

    List WorkersSynced hourly · changes only Read

    Data Sync can't be turned on while allowed is false.

    Sync run2

    237workers syncedchanged since the last run

    1. GET/workers?updated_after=2026-09-24T09:00:00Z100 · next=c_8f2a
    2. GET/workers?next=c_8f2a&updated_after=2026-09-24T09:00:00Z100 · next=c_90bd
    3. GET/workers?next=c_90bd&updated_after=2026-09-24T09:00:00Z37 · no next
    4. Done in 3 requests. Unchanged workers stay as they were.

    What your agent gets3

    workday_list_workers_s1query

    Filter, search, sort and count synced Workday workers, in about 0.2 seconds.

    departmentstatuscountryjobTitlestartDateprobationEndDate

    filtermatchsortaggssource

    No query tool. The agent can only page through the live Workday API.

    Deep Query syntax. Filter, search and count
    on any synced field.

    Query tools take OpenSearch-style queries. Your agent looks up each synced field and its type first, then filters, searches and aggregates on it.

    Filter

    • termequals
    • termsany of
    • rangegt · gte · lt · lte
    • existshas a value
    • wildcardEng*
    • booland · or · not

    Search text

    • matchany of the words
    • match_phrasethe exact phrase
    • search"phrases" +must -not prefix*

    Aggregate

    • termsgroup by
    • date_histogramby day, week, month
    • histogram · range · date_rangebuckets
    • sum · avg · min · max
    • cardinalitydistinct count
    • value_count · stats · percentiles

    Shape the result

    • sortany field, asc or desc
    • sourceonly the fields named
    • page_sizeup to 200
    • skipup to 10,000

    Deep Query FAQ. How Deep Query works
    with your AI agent.

    Get started with Deep Query.

    Turn on Data Sync for a supported action and your agent gets its query tools over MCP.