Follow the pagination contract
Check whether the tool returns a cursor, offset, page number, or explicit completion flag. Treat a short page as complete only if the API documents that behavior; some systems return fewer results while still providing a continuation marker.
Preserve query parameters between pages and avoid changing sort order during traversal. If records can change while paging, use a stable sort key or snapshot mechanism when available, then deduplicate by a stable record identifier.
Confirm completeness before acting
Compare the number of fetched records with any total count or completion metadata supplied by the tool. If there is no total, record the cursor chain and verify that the final response contains no next-page indicator.
For bulk updates or exports, save progress so an interruption can resume from the last confirmed cursor. Do not treat a partially fetched result as the full set when deleting, reconciling, or reporting totals.