Skip to content

fix(mcp): select Location subfields for coordinate signals - #304

Merged
zer0stars merged 2 commits into
mainfrom
fix/mcp-location-signals
Aug 4, 2026
Merged

fix(mcp): select Location subfields for coordinate signals#304
zer0stars merged 2 commits into
mainfrom
fix/mcp-location-signals

Conversation

@zer0stars

Copy link
Copy Markdown
Member

Problem

The MCP shortcut tools telemetry_get_signals_time_series and telemetry_get_latest_signals render selection sets that only work for scalar signals. Any request naming currentLocationCoordinates / currentLocationApproximateCoordinates produced invalid GraphQL and failed with:

Field "currentLocationCoordinates" of type "Location" must have a selection of subfields

Hit in production by the Driver app agent on 2026-08-03 — the agent concluded lat/lng was unavailable and reported that to the user.

Fix

  • Location signal names are read from the parsed GraphQL schema at override time (SignalCollection fields typed SignalLocation), so regenerated signals are picked up automatically.
  • Both selection templates branch on those names and emit { latitude longitude hdop } subfield selections.
  • Tool descriptions now document location support and the LocationAggregation set (AVG, RAND, FIRST, LAST).

Tests

  • Unit: rendered queries for location+float mixes now validate against the real schema with gqlparser's validator (parse-only checks could not catch this class of bug).
  • E2E: location signal inserted into ClickHouse; both tools round-trip coordinates. Verified failing before the fix with the exact production errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_015hwzo7z9hmuqgJ2SHPusac

telemetry_get_signals_time_series and telemetry_get_latest_signals
rendered bare selections for location signals, so every call naming
currentLocationCoordinates failed with "must have a selection of
subfields". Location signal names now come from the parsed schema
and render { latitude longitude hdop }; descriptions document the
LocationAggregation set.
@zer0stars
zer0stars marked this pull request as ready for review August 4, 2026 01:33
@zer0stars
zer0stars merged commit bc4909c into main Aug 4, 2026
4 checks passed
@zer0stars
zer0stars deleted the fix/mcp-location-signals branch August 4, 2026 01:33
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