You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert ground_location_tool to use the MCP tasks extension (SEP-1686, official extension in the 2026-07-28 RC) so the agent gets the cheap, deterministic pieces (place name) immediately while the slower pieces (sampling-classified POI search, isochrone) stream in as they resolve.
Why
ground_location_tool today does roughly:
(Optional) MCP sampling to classify the grounding strategy as routing / neighborhood / poi / region — round-trip to the client's model, variable latency, can take several hundred ms
Parallel fan-out of three Mapbox API calls: reverse geocode, category search (if query), isochrone
Block until all three return
Format + return as one text payload
Steps 2 and 3 are individually quick (each <1s typically) but the sampling step in 1 makes the whole call feel sluggish, and the user sees nothing until everything is done — even though the reverse-geocoded place name is usually available in ~100ms.
A task-based shape lets the server:
Return a task handle from tools/call immediately
Resolve the reverse-geocode and surface it as the first task update (the agent now has the place name + coords)
Resolve the sampling classification in parallel
Surface POI and isochrone results as additional updates as they complete
Final task state has the formatted summary
For an agent that just needs "what place is this?", it can read the first update and move on — no need to wait for the isochrone. For a user that wants the full grounded context, they get it incrementally rather than as one delayed blob.
Less obvious benefit
The current PR #173 implementation has a fallback path when the client doesn't support sampling: it defaults to neighborhood strategy. A task-based version makes this fallback more graceful — the task can declare immediately what strategies it ran with and what's pending, instead of either blocking on sampling or silently downgrading.
Compatibility
Like the MTS proposal in #196, clients that don't advertise the tasks extension would just get the current behavior: synchronous call, full result at the end. The task path is purely additive.
Implementation notes
MapboxApiBasedTool.execute() would need a sibling like executeTask() that returns an in-progress task with hooks to update state — exact shape depends on the final task extension spec (still experimental)
Progress updates carry the same structuredContent shape we already return, just incrementally — UI surfaces (Claude Desktop, etc.) that want to render the streaming state can do so without us defining a custom progress contract
Summary
Convert
ground_location_toolto use the MCP tasks extension (SEP-1686, official extension in the 2026-07-28 RC) so the agent gets the cheap, deterministic pieces (place name) immediately while the slower pieces (sampling-classified POI search, isochrone) stream in as they resolve.Why
ground_location_tooltoday does roughly:routing/neighborhood/poi/region— round-trip to the client's model, variable latency, can take several hundred msquery), isochroneSteps 2 and 3 are individually quick (each <1s typically) but the sampling step in 1 makes the whole call feel sluggish, and the user sees nothing until everything is done — even though the reverse-geocoded place name is usually available in ~100ms.
A task-based shape lets the server:
tools/callimmediatelyFor an agent that just needs "what place is this?", it can read the first update and move on — no need to wait for the isochrone. For a user that wants the full grounded context, they get it incrementally rather than as one delayed blob.
Less obvious benefit
The current PR #173 implementation has a fallback path when the client doesn't support sampling: it defaults to
neighborhoodstrategy. A task-based version makes this fallback more graceful — the task can declare immediately what strategies it ran with and what's pending, instead of either blocking on sampling or silently downgrading.Compatibility
Like the MTS proposal in #196, clients that don't advertise the tasks extension would just get the current behavior: synchronous call, full result at the end. The task path is purely additive.
Implementation notes
MapboxApiBasedTool.execute()would need a sibling likeexecuteTask()that returns an in-progress task with hooks to update state — exact shape depends on the final task extension spec (still experimental)structuredContentshape we already return, just incrementally — UI surfaces (Claude Desktop, etc.) that want to render the streaming state can do so without us defining a custom progress contractRelated