Repository navigation
Conversation
This branch has not been deployed
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.
Summary
Fix
search_devicesso its documented interface maps to the query parameter names and values accepted by the Bugfender devices API.The MCP schema advertises
last_active,name_asc, andname_desc, but forwardinglast_activedirectly causes the API to returnInvalid order. The Get App Devices API documentation specifies these tokens instead:last_active->seenname_asc->nameazname_desc->namezaThis keeps the clearer MCP-facing enum while translating it at the HTTP boundary. If the API rejects an order value, the returned error now lists both accepted MCP values and API tokens.
The same query mapper corrects additional schema drift:
name->device_namemodel->device_modelenabled->device_status(1or0)next_cursor->nextCursorcurrent_app_versionis now an integer app-version ID and maps toversiondevice_idis exposed for exact UID/UDID filtering and prefix matchingThe API exposes a versions listing endpoint, but accepting the integer ID directly matches the existing
search_logsconvention and avoids ambiguity when one version string has multiple builds. Callers can obtain IDs fromlist_app_versions.Undocumented filters
date_range_start,date_range_end,log_text, andlog_levelwere advertised and forwarded to the devices endpoint, but are absent from the Get App Devices documentation. Each was tested individually against a live app with otherwise valid query parameters. Every one returned HTTP 400 withInvalid query parameters; none was silently ignored. They have therefore been removed from thesearch_devicesschema.Tests
pnpm testpnpm checkpnpm build