feat(crashlytics): thread pageToken through get_report - #11048
Open
alexander-smityuk wants to merge 2 commits into
Open
feat(crashlytics): thread pageToken through get_report#11048alexander-smityuk wants to merge 2 commits into
alexander-smityuk wants to merge 2 commits into
Conversation
The Crashlytics reports API returns a `nextPageToken` when more groups are available, but `getReport` had no way to send it back, so the `get_report` MCP tool could only ever see the first page of results. Add an optional `pageToken` to `ReportInputSchema` and to `getReport`, forward it as the `page_token` query parameter when set, and pass it through from the MCP tool. The tool description now tells agents to call again with `pageToken` when a `nextPageToken` is present. Behavior is unchanged when no `pageToken` is given: no `page_token` parameter is sent.
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for pageToken in the Crashlytics get_report MCP tool, allowing agents to page through report groups using the nextPageToken from previous responses. The changes include updating the input schema, updating the API call parameters to include page_token when provided, updating the tool description, and adding corresponding unit tests. I have no feedback to provide.
Author
|
@joehan Hi, this is a small addition to the Crashlytics get_report MCP tool. Happy to adjust if you'd prefer a different shape. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Crashlytics reports API returns a
nextPageTokenwhen a report has more groups thanpageSize, andReportalready declaresnextPageToken?: string. ButgetReporthad no parameter for sending a token back, so thecrashlytics get_reportMCP tool could only ever observe the first page — an agent that sawnextPageTokenin the output had no way to act on it.This threads a page token through the existing call path:
getReporttakes an optionalpageTokenand, when set, sends it as thepage_tokenquery parameter alongsidepage_size.ReportInputSchemagains an optionalpageToken, described so an agent knows to source it from a previous response'snextPageTokenand to keepfilterandpageSizestable across the calls.get_reporttool passes it through and its description now tells agents what to do whennextPageTokenis present.No behavior changes when no token is supplied:
page_tokenis simply not sent. The parameter is optional and trailing, so existinggetReportcallers are unaffected.Scenarios Tested
The
src/crashlytics(100 tests) andsrc/mcp(169 tests) suites pass locally. Two unit tests were added tosrc/crashlytics/reports.spec.ts:page_tokenis sent with the given value when apageTokenis passed.page_tokenis absent otherwise — the nock interceptor uses an exact query match, so an unexpectedpage_tokenwould fail to match andnock.isDone()would be false.Also verified
tsc --noEmitis clean andeslint/prettierreport no new errors on the changed files.Sample Commands
No CLI command or flag changes. Via the MCP tool, paging now looks like: