Skip to content

Conversation

timothedelion
Copy link
Collaborator

1

The paginate_all method was only checking for "results" key in API responses, but some GitGuardian API endpoints return data using a "data" key instead. This caused get_all=True to fail by returning empty lists.

Added support for both response formats:

  • {"results": [...]} (existing)
  • {"data": [...]} (newly added)

This fixes MCP tool calls with get_all=True parameter for endpoints like list_repo_incidents, list_repo_occurrences, and remediate_secret_incidents.

@timothedelion timothedelion self-assigned this Oct 17, 2025
…fetching one page on paginated endpoints

Issue: APPAI-32
@timothedelion timothedelion force-pushed the tdelion/APPAI-32/optimize-token-usage branch from 3ebdc63 to bff145e Compare October 17, 2025 12:32
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.

1 participant