This repository was archived by the owner on Feb 26, 2026. It is now read-only.
fix: ensure all tool responses are JSON-serializable#24
Open
oheckmann74 wants to merge 1 commit into
Open
Conversation
Many tool handlers were returning `{ toolResult: ... }` which doesn't
properly serialize the response for MCP clients. This causes tools like
`list_group_testers` to return `[object Object]` instead of actual data.
Changed all affected handlers to use the existing `formatResponse()`
helper which wraps responses in the proper MCP content format with
`JSON.stringify()`.
Affected tools:
- list_beta_groups
- list_group_testers
- add_tester_to_group
- remove_tester_from_group
- create_app_store_version
- list_app_store_versions
- list_app_store_version_localizations
- get_app_store_version_localization
- update_app_store_version_localization
- create_bundle_id
- list_bundle_ids
- get_bundle_id_info
- enable_bundle_capability
- disable_bundle_capability
- list_devices
- list_users
- create_analytics_report_request
- list_analytics_reports
- list_analytics_report_segments
- download_analytics_report_segment
- download_sales_report
- download_finance_report
- list_schemes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Several MCP tool handlers return
{ toolResult: ... }which doesn't properly serialize the response. This causes tools likelist_group_testersto return[object Object]instead of actual tester data.Problem
When calling
list_group_testers, the MCP client receives:Instead of the actual tester data array.
Root Cause
The
list_appsandget_app_infohandlers useformatResponse():But most other handlers return raw objects:
Solution
Changed all affected handlers to use
formatResponse()which wraps responses in the proper MCP content format withJSON.stringify().Affected Tools
list_beta_groupslist_group_testersadd_tester_to_groupremove_tester_from_groupcreate_app_store_versionlist_app_store_versionslist_app_store_version_localizationsget_app_store_version_localizationupdate_app_store_version_localizationcreate_bundle_idlist_bundle_idsget_bundle_id_infoenable_bundle_capabilitydisable_bundle_capabilitylist_deviceslist_userscreate_analytics_report_requestlist_analytics_reportslist_analytics_report_segmentsdownload_analytics_report_segmentdownload_sales_reportdownload_finance_reportlist_schemesTest Plan
npm run build)list_group_testerswith a valid group ID