Skip to content

Conversation

@JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Sep 2, 2025

Description

Adds pagination support to the list_resources function to address issue #89 where metadata output was getting truncated on larger clusters.

Changes

  • Added limit and continue parameters to the HandleListResources function
  • Updated Kubernetes client functions to support pagination via ListOptions
  • Preserved continue token in response metadata for pagination flow
  • Added comprehensive tests for pagination functionality

Impact

This change allows clients to:

  • Control the number of items returned per request
  • Iterate through large result sets using continuation tokens
  • Handle large clusters without truncation issues

Fixes #89

@JAORMX JAORMX force-pushed the feat/add-pagination-support branch from 2f7f3a6 to ad10fa9 Compare September 2, 2025 10:02
- Add limit and continue parameters to list_resources MCP handler
- Update k8s client ListClusteredResources and ListNamespacedResources to support pagination
- Preserve continue token in response metadata for pagination flow
- Add comprehensive tests for pagination functionality

This addresses issue #89 where metadata output was getting truncated
on larger clusters. Users can now:
- Set a limit on the number of items returned
- Use continue tokens to fetch subsequent pages
- Combine both for controlled pagination through large result sets

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX force-pushed the feat/add-pagination-support branch from ad10fa9 to 93f4f97 Compare September 2, 2025 10:38
@JAORMX JAORMX merged commit b0f3648 into main Sep 2, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metadata Output getting truncated

3 participants