web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Using MCP for Large Sales Data Queries

(1) ShareShare
ReportReport
Posted on by 23

I’m using MCP to analyze sales data (e.g., total sales for 2025, Q1 sales, and comparisons with current data).

To handle large datasets, I added instructions in the Overview section to:

  • Fetch records in batches (e.g., 1500 at a time)
  • Continue automatically for all batches
  • Aggregate totals across batches
 (this is from MCP Overview page)

Problem:

  • First batch works correctly
  • Copilot asks to continue instead of proceeding automatically
  • Next batch often fails with “too much data”
  • Results are incomplete and inconsistant
Question:
  • What is the recommended approach for large datasets?
  • Does MCP support pagination/aggregation via Overview instructions?
  • How can we ensure automatic batch processing without prompts?
  • Should this be handled outside MCP (e.g., APIs or pre-aggregated data), and if so, can we process/aggregate the data externally and then load or expose the summarized data back into MCP for querying? If yes, how to do it?
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    15,103 Super User 2026 Season 1 on at
    Hello,
    don’t rely on MCP Overview instructions to do reliable pagination/aggregation over large Business Central datasets; those instructions can guide the agent, but they don’t guarantee a loop will continue silently, avoid token/context limits, or aggregate every page consistently. The better pattern is to expose a purpose-built tool/API that returns the answer already aggregated, for example get_sales_total(year), get_sales_by_period(startDate,endDate), or get_sales_comparison(...), and let that backend handle Business Central API pagination using @odata.nextLink, batching, retries, and totals; then MCP only receives the small summarized result. For BC specifically, I’d either create an API page/query/codeunit endpoint that returns pre-aggregated sales totals, or use an external service/Azure Function/Power Automate/custom connector that reads BC in pages, aggregates externally, stores results in Dataverse/SQL/Business performance analytics, and exposes those summaries back to Copilot/MCP as a small tool result. Microsoft’s guidance for MCP timeout/large-data issues is also to focus queries on aggregated data, limit time ranges, and break complex analysis into steps, so raw transaction-level analysis through chat is the wrong layer for this. 
    Regards,
    Oussama Sabbouh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,957 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 956 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 645 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans