fix(mcp): read total_datasets so the fetch-all early-exit works (#19020)

Fix #19019 — MCP _fetch_all_datasets() used wrong total key (total vs total_datasets), causing extra empty-page requests. Now reads total_datasets with fallback.
This commit is contained in:
xu jiaming authored and GitHub committed 2026-09-02 19:05:50 +08:00
1 parent cf441d4c72
commit c187dfdc73
5 files changed
+162 -24

No files matched your search

+1 -1
View File
@@ -304,7 +304,7 @@ def get_result(code=RetCode.SUCCESS, message="", data=None, total=None):
{
"code": 0,
"data": [...], # List or object, backward compatible
"total": 47, # Optional field for pagination
"total_datasets": 47, # Optional field for pagination
"message": "..." # Error or status message
}
"""