Skip to content

Conversation

@ngoiyaeric
Copy link
Collaborator

@ngoiyaeric ngoiyaeric commented Nov 10, 2025

User description

This PR addresses two issues that arose after the migration to Grok 4:\n\n1. Mapbox MCP Tool Names: The tool names in lib/agents/tools/geospatial.tsx were updated to match the new names used by the Mapbox MCP server, which were causing the MCP calls to fail.\n2. Grok Model ID: The model ID in lib/utils/index.ts and components/settings/components/model-selection-form.tsx was updated from Grok-3 to Grok-4 to ensure the correct model is being selected and used.


PR Type

Bug fix, Enhancement


Description

  • Updated Grok model ID from grok-4-fast-non-reasoning to grok-4

  • Migrated Mapbox MCP tool names to match new server API

  • Refactored tool argument structures for Mapbox compatibility

  • Updated model selection UI to reflect Grok-4 availability


Diagram Walkthrough

flowchart LR
  A["Grok Model Config"] -->|Update ID| B["grok-4"]
  C["Mapbox MCP Tools"] -->|Rename tools| D["New tool names"]
  D -->|Restructure args| E["Updated parameters"]
  B --> F["Model Selection UI"]
  E --> F
Loading

File Walkthrough

Relevant files
Bug fix
index.ts
Update Grok model ID to grok-4                                                     

lib/utils/index.ts

  • Changed Grok model ID from grok-4-fast-non-reasoning to grok-4
  • Ensures correct model is selected in the getModel() function
+1/-1     
geospatial.tsx
Migrate Mapbox MCP tool names and arguments                           

lib/agents/tools/geospatial.tsx

  • Updated all Mapbox MCP tool names to match new server API (e.g.,
    directions_toolcalculate_distance)
  • Refactored tool argument structures for all query types (directions,
    distance, search, reverse, geocode, map)
  • Changed parameter names to align with new Mapbox MCP interface (e.g.,
    waypointsfrom/to, searchTextquery)
  • Updated map preview parameter naming (includeMapPreview
    includeRouteMap for directions/distance)
+12/-12 
Enhancement
model-selection-form.tsx
Update model selection UI to Grok-4                                           

components/settings/components/model-selection-form.tsx

  • Updated model ID from Grok-3 to Grok-4
  • Updated model name display to Grok-4
  • Updated description to indicate Grok-4 availability
+3/-3     
Dependencies
pnpm-lock.yaml
Update dependency lock file                                                           

pnpm-lock.yaml

  • Dependency lock file updated (insufficient details available)
+10009/-3502

Summary by CodeRabbit

  • New Features

    • Grok-4 model is now available for selection in model settings.
  • Updates

    • Geospatial tools enhanced with improved tool selection and argument handling.

@vercel
Copy link
Contributor

vercel bot commented Nov 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
qcx Error Error Nov 10, 2025 7:14am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

Three files updated: Grok model references changed from Grok-3 and Grok-4-fast-non-reasoning to Grok-4; geospatial tool mappings and argument schemas refactored to align with new MCP tool identifiers while maintaining control flow.

Changes

Cohort / File(s) Change Summary
Model Version Updates
components/settings/components/model-selection-form.tsx, lib/utils/index.ts
Upgraded Grok model references: replaced Grok-3 with Grok-4 in model selection form and changed XAI path to request grok-4 instead of grok-4-fast-non-reasoning
Geospatial Tool Mappings
lib/agents/tools/geospatial.tsx
Updated tool selection mapping (directions/distance → calculate_distance, search → search_nearby_places, map → generate_map_link, reverse/geocode → geocode_location) and revised tool argument construction schemas (e.g., directions now accepts from, to, profile, includeRouteMap) to align with new MCP tool interfaces

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Focus areas: Verify all geospatial tool mapping transitions in lib/agents/tools/geospatial.tsx are correct (each query type to its new tool identifier and argument schema alignment)

Possibly related PRs

Suggested labels

Review effort 2/5

Poem

🐰 Grok hops from three to four so fine,
Tools map anew in grand design,
Geospatial paths now clearly shine,
A refactor's dance, both smart and kind! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating Grok model compatibility and fixing Mapbox MCP tool names across multiple files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/grok-4-mcp-image-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@charliecreates
Copy link

  1. Nice, clear update described in the PR, with focus on critical compatibility post-Grok 4 migration.
  2. The renaming in lib/agents/tools/geospatial.tsx for MCP tool names should help eliminate integration issues. Check for any missed strings or usages—sometimes, references sneak into docs or tests.
  3. The Grok-3 to Grok-4 change in lib/utils/index.ts and model selection form looks straightforward, just confirm there aren’t any lingering dependency/version constraints elsewhere—especially in test setups or scripts.
  4. Any changes to pnpm-lock.yaml should be trivial here (since the impact is mainly name/model swaps), but consider running a fresh install to rule out subtle lockfile drift.
  5. Since these updates directly influence critical parts (model selection and geospatial tool integration), a quick smoke-test covering tool invocation and settings UI would be ideal.

Overall, solid and focused fixes—these should resolve recent breakages around the Grok/Mapbox tooling.

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No audit logs: The new code changes invoke external tools and alter request arguments without adding any
audit logging of critical actions, but it is unclear whether logging is handled elsewhere.

Referred Code
    case 'directions': return prefer('calculate_distance') 
    case 'distance': return prefer('calculate_distance');
    case 'search': return prefer('search_nearby_places');
    case 'map': return prefer('generate_map_link') 
    case 'reverse': return prefer('geocode_location');
    case 'geocode': return prefer('geocode_location');
  }
})();

// Build arguments
const toolArgs = (() => {
  switch (queryType) {
    case 'directions': return { from: params.origin, to: params.destination, profile: params.mode, includeRouteMap: includeMap };
    case 'distance': return { from: params.origin, to: params.destination, profile: params.mode || 'driving', includeRouteMap: includeMap };
    case 'reverse': return { query: `${params.coordinates.latitude},${params.coordinates.longitude}`, includeMapPreview: includeMap, maxResults: params.maxResults || 5 };
    case 'search': return { location: params.location, query: params.query, radius: params.radius || 1000, limit: params.maxResults || 5, includeMapPreview: includeMap };
    case 'geocode': return { query: params.location, includeMapPreview: includeMap, maxResults: params.maxResults || 5 };
    case 'map': return { location: params.location, includeMapPreview: includeMap };
  }

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Generic catch: The catch block logs a generic warning without including error context or providing a
clear fallback path within the shown diff, which may hinder debugging if xAI
initialization fails.

Referred Code
try {
  return xai('grok-4')
} catch (error) {
  console.warn('xAI API unavailable, falling back to OpenAI:')
}

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Unvalidated params: The new argument mappings pass through values like coordinates, location, and query
directly to external tools without visible validation or sanitization in the diff.

Referred Code
case 'directions': return { from: params.origin, to: params.destination, profile: params.mode, includeRouteMap: includeMap };
case 'distance': return { from: params.origin, to: params.destination, profile: params.mode || 'driving', includeRouteMap: includeMap };
case 'reverse': return { query: `${params.coordinates.latitude},${params.coordinates.longitude}`, includeMapPreview: includeMap, maxResults: params.maxResults || 5 };
case 'search': return { location: params.location, query: params.query, radius: params.radius || 1000, limit: params.maxResults || 5, includeMapPreview: includeMap };
case 'geocode': return { query: params.location, includeMapPreview: includeMap, maxResults: params.maxResults || 5 };
case 'map': return { location: params.location, includeMapPreview: includeMap };

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Separate dependency upgrades from bug fixes

This PR mixes bug fixes with a large-scale dependency upgrade, including major
versions of React and Next.js. These changes should be separated into two
distinct PRs to mitigate risk and simplify review.

Examples:

pnpm-lock.yaml [9-1316]
  .:
    dependencies:
      '@ai-sdk/amazon-bedrock':
        specifier: ^1.1.6
        version: 1.1.6(zod@3.24.1)
      '@ai-sdk/anthropic':
        specifier: ^1.2.12
        version: 1.2.12(zod@3.24.1)
      '@ai-sdk/google':
        specifier: ^1.2.22

 ... (clipped 1298 lines)

Solution Walkthrough:

Before:

PR #1: "Fixes and dependency updates"

Changes:
- file: 'lib/utils/index.ts'
  // Change Grok model ID
- file: 'lib/agents/tools/geospatial.tsx'
  // Update Mapbox tool names
- file: 'pnpm-lock.yaml'
  // Upgrade React 18 -> 19
  // Upgrade Next.js 14 -> 15
  // ... and hundreds of other dependency updates

After:

PR #1: "Chore: Upgrade project dependencies"

Changes:
- file: 'pnpm-lock.yaml'
  // Upgrade React 18 -> 19
  // Upgrade Next.js 14 -> 15
  // ... and hundreds of other dependency updates

PR #2: "Fix: Update Grok model and Mapbox tool names"

Changes:
- file: 'lib/utils/index.ts'
  // Change Grok model ID
- file: 'lib/agents/tools/geospatial.tsx'
  // Update Mapbox tool names
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical process issue; mixing massive dependency upgrades with functional fixes introduces significant risk and makes debugging and reviewing nearly impossible.

High
Possible issue
Use a dedicated tool for directions

Use a dedicated tool for the 'directions' query type, such as get_directions,
instead of reusing the calculate_distance tool to ensure correct functionality.

lib/agents/tools/geospatial.tsx [252-259]

 switch (queryType) {
-  case 'directions': return prefer('calculate_distance') 
+  case 'directions': return prefer('get_directions') 
   case 'distance': return prefer('calculate_distance');
   case 'search': return prefer('search_nearby_places');
   case 'map': return prefer('generate_map_link') 
   case 'reverse': return prefer('geocode_location');
   case 'geocode': return prefer('geocode_location');
 }
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: This suggestion correctly identifies a likely functional regression where the directions query type no longer provides directions, only distance, which is a critical bug.

High
Use distinct tools for geocoding

Use distinct tools for forward and reverse geocoding, such as geocode_location
and reverse_geocode_location, to reflect their different operations and
arguments.

lib/agents/tools/geospatial.tsx [252-259]

 switch (queryType) {
   case 'directions': return prefer('calculate_distance') 
   case 'distance': return prefer('calculate_distance');
   case 'search': return prefer('search_nearby_places');
   case 'map': return prefer('generate_map_link') 
-  case 'reverse': return prefer('geocode_location');
+  case 'reverse': return prefer('reverse_geocode_location');
   case 'geocode': return prefer('geocode_location');
 }
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: This suggestion correctly points out that mapping both forward and reverse geocoding to the same tool name geocode_location is confusing and likely incorrect, as they are distinct operations with different arguments.

Medium
Add proximity to improve search

Reintroduce the proximity parameter to the arguments for the 'search' case to
improve the relevance of search results by biasing them towards the user's
location.

lib/agents/tools/geospatial.tsx [268]

-case 'search': return { location: params.location, query: params.query, radius: params.radius || 1000, limit: params.maxResults || 5, includeMapPreview: includeMap };
+case 'search': return { location: params.location, query: params.query, radius: params.radius || 1000, limit: params.maxResults || 5, includeMapPreview: includeMap, ...(params.coordinates && { proximity: `${params.coordinates.latitude},${params.coordinates.longitude}` }) };
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: This suggestion correctly identifies the removal of the proximity parameter, which is a functional regression that will lead to less relevant search results.

Medium
  • More

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
lib/agents/tools/geospatial.tsx (1)

151-216: Consider refactoring the lengthy tool description.

The tool description spans 65+ lines and contains detailed documentation for all sub-tools. While comprehensive, this makes the code harder to maintain and read.

Consider one of these approaches:

  1. Extract to separate documentation file:
// Import description from external file
import { GEOSPATIAL_TOOL_DESCRIPTION } from './descriptions/geospatial-tool-description';

export const geospatialTool = ({ uiStream }) => ({
  description: GEOSPATIAL_TOOL_DESCRIPTION,
  parameters: geospatialQuerySchema,
  // ...
});
  1. Create a concise summary with reference to external docs:
description: `Provides comprehensive location-based query capabilities including:
- Static map image generation
- Category search for POIs
- Reverse geocoding and address lookup
- Route directions and distance calculation
- Isochrone analysis for reachable areas
- Location search and geocoding

See docs/geospatial-tools.md for detailed feature documentation.`,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5fb1da and b060c9f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • components/settings/components/model-selection-form.tsx (1 hunks)
  • lib/agents/tools/geospatial.tsx (1 hunks)
  • lib/utils/index.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
lib/agents/tools/geospatial.tsx (1)
components/map/map-query-handler.tsx (3)
  • GeospatialToolOutput (18-23)
  • toolOutput (33-74)
  • MapQueryHandlerProps (25-28)
🔇 Additional comments (2)
lib/utils/index.ts (1)

33-33: Model ID verified as correct.

The model ID 'grok-4' is a valid alias for the xAI API's Grok 4 model (official model name: grok-4-0709). The change from 'grok-4-fast-non-reasoning' to 'grok-4' is appropriate.

components/settings/components/model-selection-form.tsx (1)

31-33: The review comment is based on an incorrect premise.

The original concern about a case mismatch between "Grok-4" (UI) and "grok-4" (API) assumes that the selectedModel form value is passed to the API. However, verification shows this is not the case:

  • The form collects selectedModel but it is never used anywhere in the codebase (search for data.selectedModel returned zero results)
  • The onSubmit function (lines 90-130) only calls saveSystemPrompt() with the system prompt; selectedModel is not passed to any function
  • The getModel() function is hardcoded and called with no parameters across the entire codebase—it always returns a fixed model (currently xai('grok-4') if XAI_API_KEY is set), regardless of form selection

The model selection form appears to be non-functional as currently implemented. There is no case sensitivity issue because the form value never reaches the API layer.

Likely an incorrect or invalid review comment.

Comment on lines +253 to 260
case 'directions': return prefer('calculate_distance')
case 'distance': return prefer('calculate_distance');
case 'search': return prefer('search_nearby_places');
case 'map': return prefer('generate_map_link')
case 'reverse': return prefer('geocode_location');
case 'geocode': return prefer('geocode_location');
}
})();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Tool name mappings updated correctly for new MCP server.

The tool name mappings have been updated to match the new MCP server identifiers. The logic correctly handles multiple query types mapping to the same underlying MCP tool (e.g., both 'directions' and 'distance' use 'calculate_distance', both 'reverse' and 'geocode' use 'geocode_location').

To confirm these tool names match the MCP server's current interface, verify the available tools by checking the server's tool listing output at lines 122-126 during runtime, or consult the Mapbox MCP server documentation.


🌐 Web query:

What are the available tool names in the Mapbox MCP server version 1.0.0?

💡 Result:

The Mapbox MCP Server exposes these tools: MatrixTool, StaticMapTool, POISearchTool, CategorySearchTool, ForwardGeocodeTool, ReverseGeocodeTool, DirectionsTool, and IsochroneTool. [1][2]

Sources:
[1] Mapbox mcp-server README (GitHub).
[2] Mapbox MCP Server docs — Tools list.


Tool name mappings are incorrect and will cause runtime failures.

The tool names in lines 253-258 do not exist in the Mapbox MCP server. The Mapbox MCP Server exposes these tools: MatrixTool, StaticMapTool, POISearchTool, CategorySearchTool, ForwardGeocodeTool, ReverseGeocodeTool, DirectionsTool, and IsochroneTool.

The code references non-existent tool names:

  • 'calculate_distance' - does not exist
  • 'search_nearby_places' - does not exist
  • 'generate_map_link' - does not exist
  • 'geocode_location' - does not exist

These must be mapped to the correct Mapbox MCP server tool names. For example, 'directions' and 'distance' likely correspond to DirectionsTool or MatrixTool, 'search' corresponds to POISearchTool or CategorySearchTool, 'reverse' and 'geocode' correspond to ReverseGeocodeTool or ForwardGeocodeTool, etc.

🤖 Prompt for AI Agents
In lib/agents/tools/geospatial.tsx around lines 253 to 260, the case arms map to
non-existent MCP tool names and will fail at runtime; replace the incorrect
names with the actual Mapbox MCP tool names: map 'directions' ->
prefer('DirectionsTool'), map 'distance' -> prefer('MatrixTool') (or
DirectionsTool if matrix isn't available in your usage), map 'search' ->
prefer('POISearchTool') (or 'CategorySearchTool' if you need category-based
search), map 'map' -> prefer('StaticMapTool'), and map both 'reverse' and
'geocode' -> prefer('ReverseGeocodeTool') or use 'ForwardGeocodeTool' for
forward geocoding; update each return to use those exact tool names so they
match the MCP server.

Comment on lines +265 to 272
case 'directions': return { from: params.origin, to: params.destination, profile: params.mode, includeRouteMap: includeMap };
case 'distance': return { from: params.origin, to: params.destination, profile: params.mode || 'driving', includeRouteMap: includeMap };
case 'reverse': return { query: `${params.coordinates.latitude},${params.coordinates.longitude}`, includeMapPreview: includeMap, maxResults: params.maxResults || 5 };
case 'search': return { location: params.location, query: params.query, radius: params.radius || 1000, limit: params.maxResults || 5, includeMapPreview: includeMap };
case 'geocode': return { query: params.location, includeMapPreview: includeMap, maxResults: params.maxResults || 5 };
case 'map': return { location: params.location, includeMapPreview: includeMap };
}
})();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify argument schemas match the new MCP server interface.

The argument construction has been updated significantly to align with the new MCP tool interfaces. Each query type now provides tailored arguments with appropriate defaults. However, please verify that these argument names and structures match the expected input schema for the new MCP server tools.

Run the following script to check if there are any callers of geospatialTool that might need updates for the new schema:


🏁 Script executed:

#!/bin/bash
# Find all usages of geospatialTool to verify they're compatible with new schema
ast-grep --pattern 'geospatialTool($$$)'

# Also search for files that import geospatialTool
rg -n -B 2 -A 10 "import.*geospatialTool" --type=ts --type=tsx

Length of output: 261


🏁 Script executed:

#!/bin/bash
# Find the geospatialTool function definition
rg -n -A 30 "export.*function.*geospatialTool|const.*geospatialTool.*=" lib/agents/tools/geospatial.tsx --type=ts --type=tsx

# Find where geospatialQueryTool is called/invoked
rg -n -B 3 -A 3 "geospatialQueryTool\(" --type=ts --type=tsx

Length of output: 55


🏁 Script executed:

#!/bin/bash
# Find the geospatialTool function definition - search all tsx/ts files without type flag
rg -n -A 35 "export.*function.*geospatialTool|const.*geospatialTool.*=" -g "*.tsx" -g "*.ts"

# Find where geospatialQueryTool is called/invoked
rg -n -B 3 -A 3 "geospatialQueryTool\(" -g "*.tsx" -g "*.ts"

# Also check the full context around the argument construction in geospatial.tsx
cat lib/agents/tools/geospatial.tsx | head -300 | tail -80

Length of output: 7112


🏁 Script executed:

#!/bin/bash
# Search for MCP server definitions, schemas, or configuration files
find . -type f \( -name "*schema*" -o -name "*mcp*" -o -name "*.md" \) -not -path "*/node_modules/*" | head -20

# Search for mapbox-related configuration or types
rg -n "mapbox|MCP|mcp" -g "*.json" -g "*.ts" -g "*.tsx" --max-count=5 | grep -i "schema\|tool\|interface" | head -30

# Check if there are any test files that might reveal expected argument schemas
find . -path "*/test*" -o -path "*/__tests__/*" | grep -i "geospatial\|mcp" | head -10

# Search for any inline schema or type definitions for tool arguments
rg -n "calculate_distance|search_nearby_places|geocode_location|generate_map_link" -g "*.ts" -g "*.tsx" -B 5 -A 5

Length of output: 9285


🏁 Script executed:

#!/bin/bash
# Check mapbox_mcp_config.json for schema definitions
cat mapbox_mcp_config.json

# Search for generate_map_link usage
rg -n "generate_map_link" -g "*.ts" -g "*.tsx" -B 3 -A 3

Length of output: 2012


Fix argument schema mismatches with MCP tool calls.

The argument construction includes parameters that don't match the verified tool call patterns in mapbox_mcp/hooks.ts:

  • Lines 267 & 269 (geocode_location): Remove unsupported maxResults parameter
  • Line 268 (search_nearby_places): Remove unsupported includeMapPreview parameter
  • Line 270 (generate_map_link): Verify expected arguments (no usage examples found in hooks)

Compare against verified implementations in mapbox_mcp/hooks.ts lines 164–206 where these tools are called successfully with different argument sets.

🤖 Prompt for AI Agents
In lib/agents/tools/geospatial.tsx around lines 265 to 272 the constructed
argument objects mismatch the MCP tool schemas: remove the unsupported
maxResults property from the geocode case (line ~267/269), remove
includeMapPreview from the search case (line ~268), and adjust/confirm the map
case (generate_map_link) to match the expected argument set (it likely only
needs location or other specific fields) — update those return objects to
exactly match the call shapes used in mapbox_mcp/hooks.ts (lines 164–206) so
each tool call passes only supported keys.

@ngoiyaeric ngoiyaeric closed this Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant