Skip to content

fix(aws-healthomics-mcp-server): correct no-token partial-results recovery guidance - #4853

Open
mangeshraut712 wants to merge 6 commits into
awslabs:mainfrom
mangeshraut712:fix/healthomics-partial-results-hint
Open

mangeshraut712 wants to merge 6 commits into
awslabs:mainfrom
mangeshraut712:fix/healthomics-partial-results-hint

Conversation

@mangeshraut712

@mangeshraut712 mangeshraut712 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4670

Summary

Changes

When a paginated call reports more results but returns no usable continuation token, the instruction text told the agent to retry with "a narrower filter, a smaller page size, or an alternate pagination mode". As #4670 points out, a smaller page size makes things worse here; the useful recourse is usually a larger page or different filters. The hint now says that different filters or pagination parameters may recover the missing results or yield a usable token, without steering toward a smaller page.

User experience

Before: agents hitting this case were told to shrink the page size. After: the hint no longer suggests that, and the normal partial-results and complete-results messages are unchanged.

Checklist

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Tests: extended the no-token test to check the new wording, and the token and complete cases to check it does not appear there. uv run --frozen pytest tests/test_pagination_hints.py passes (15 tests).

Is this a breaking change? (Y/N) N

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@mangeshraut712

Copy link
Copy Markdown
Contributor Author

Fixes #4670

Why: The no-token PARTIAL RESULTS hint told agents to retry with a smaller page size. For the ListAHORuns client-side filter failure mode, a smaller page drops more matches; a larger max_results (≤100) or a narrower date window is the real recourse.

What: Reword the no-token recovery guidance to generic “different filters or pagination parameters” (no “smaller page”). Pin with regression asserts in test_pagination_hints.py.

Test:

cd src/aws-healthomics-mcp-server
uv run pytest tests/test_pagination_hints.py
# 15 passed

@mangeshraut712

Copy link
Copy Markdown
Contributor Author

Green and ready — happy to adjust anything.

@mangeshraut712

Copy link
Copy Markdown
Contributor Author

@markjschreiber @WIIASD @a-li @alxawan @MaisiLi CI is green and the contributor statement check is passing. It corrects the no-token partial-results recovery hint for ListAHORuns so agents are not told to shrink the page size when that will not help. If it looks good, could you please review and merge when you get a chance? Thanks.

@mangeshraut712

Copy link
Copy Markdown
Contributor Author

CI is green. Corrects no-token partial-results recovery guidance. Please review and merge when you can.

@mangeshraut712
mangeshraut712 force-pushed the fix/healthomics-partial-results-hint branch from d828848 to bb4062f Compare October 27, 2026 14:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

aws-healthomics-mcp-server: partial-results pagination hint advises a smaller page size when a larger one is the recourse

1 participant