feat(ground-location-tool): stream results via MCP tasks extension#210
Draft
mattpodwysocki wants to merge 23 commits into
Draft
feat(ground-location-tool): stream results via MCP tasks extension#210mattpodwysocki wants to merge 23 commits into
mattpodwysocki wants to merge 23 commits into
Conversation
Implements MCP server icons at the correct architectural level (server initialization) instead of at the tool level. Adds both light and dark theme variants of the Mapbox logo using base64-encoded SVG data URIs. - Add mapbox-logo-black.svg for light theme backgrounds - Add mapbox-logo-white.svg for dark theme backgrounds - Update server initialization to include icons array with theme property - Use 800x180 SVG logos embedded as base64 data URIs This replaces the previous incorrect approach of adding icons to individual tools, which was not aligned with the MCP specification. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates the MCP SDK from 1.25.1 to 1.25.2 and recreates the output validation patch for the new version. The patch continues to convert strict output schema validation errors to warnings, allowing tools to gracefully handle schema mismatches. Changes: - Update @modelcontextprotocol/sdk from ^1.25.1 to ^1.25.2 - Recreate SDK patch for version 1.25.2 - Remove obsolete 1.25.1 patch file - All 397 tests pass with new SDK version Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Converts ground_location_tool to registerToolTask so tool/call returns a task handle immediately rather than blocking on sampling + API fan-out. Reverse geocode and sampling classification now run in parallel in the background; POI search and isochrone kick off once the strategy resolves. Requires taskSupport:'required' — only task-capable clients can invoke this path. The server is configured with InMemoryTaskStore. Fallback for non-task clients and persistent task storage are left for a follow-up. Closes #197. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ptional Changes taskSupport from 'required' to 'optional' so clients without task support get the same synchronous result as before. The SDK automatic polling path handles the fallback: it creates the task internally, waits for the background work to finish, and returns the result directly without exposing the task handle to the caller. pollInterval is set to 50ms so the polling overhead for non-task clients is negligible. Co-Authored-By: Claude Sonnet 4.6 (1M context) <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 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
Converts
ground_location_toolto useserver.experimental.tasks.registerToolTask(available in@modelcontextprotocol/sdk^1.29.0) so the tool call returns a task handle immediately rather than blocking until all API calls complete.Before:
tools/callblocks for sampling round-trip + geocode + POI + isochrone (~1-3s total), then returns one payload.After:
tools/callreturns a task handle immediately. In the background:storeTaskResult; client polls or listens fornotifications/tasks/statusChanges
src/tools/MapboxApiBasedTool.ts— makeisValidJwtFormatprotected so subclasses can use itsrc/tools/ground-location-tool/GroundLocationTool.ts— overrideinstallToto useregisterToolTask; addrunTaskBackgroundfor the async fan-outsrc/index.ts— configureMcpServerwithInMemoryTaskStoreso task lifecycle is managedtest/tools/ground-location-tool/GroundLocationTool.test.ts— two new task-flow testsKnown limitations (follow-up work)
taskSupport: 'required'— clients without task support cannot call this tool. A'supported'fallback path that runs inline for non-task clients is needed before this can ship.InMemoryTaskStore— task state is lost on server restart. A persistent store or at least a TTL-based eviction review is needed for production.Closes #197.
Test plan
npm testpasses (729 tests)ground_location_tooltests still pass (run() path unchanged)🤖 Generated with Claude Code