googleapis/mcp-toolbox · error · Error
HTTP error! status: ${response.status}
Error message
HTTP error! status: ${response.status} What it means
A "geoPointValue" must be a map containing numeric "latitude" and "longitude" keys. If either key is missing or not a float64 (after JSON decoding, only float64 counts), the converter rejects the value with this error.
Source
Thrown at internal/server/static/js/loadTools.js:45
export async function loadTools(secondNavContent, toolDisplayArea, toolsetName) {
secondNavContent.innerHTML = '<p>Fetching tools...</p>';
try {
const url = toolsetName ? `/mcp/${toolsetName}` : `/mcp`;
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'MCP-Protocol-Version': '2025-11-25'
},
body: JSON.stringify({
jsonrpc: "2.0",
id: "1",
method: "tools/list",
})
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const apiResponse = await response.json();
renderToolList(apiResponse, secondNavContent, toolDisplayArea);
} catch (error) {
console.error('Failed to load tools:', error);
secondNavContent.innerHTML = `<p class="error">Failed to load tools: <pre><code>${escapeHtml(String(error))}</code></pre></p>`;
}
}
/**
* Renders the list of tools as buttons within the provided HTML element.
* @param {Object} apiResponse The API response object containing the tools.
* @param {!HTMLElement} secondNavContent The HTML element to render the tool list into.
* @param {!HTMLElement} toolDisplayArea The HTML element for displaying tool details (passed to event handlers).
*/
function renderToolList(apiResponse, secondNavContent, toolDisplayArea) {
secondNavContent.innerHTML = '';View on GitHub (pinned to 8cc6e09de2)
Solutions
- Rename the keys to exactly "latitude" and "longitude".
- Convert coordinate strings to JSON numbers so they decode as float64.
- Wrap the pair in a map if it was passed as a plain string.
Example fix
// before
{"geoPointValue": {"lat": "37.4", "lng": "-122.1"}}
// after
{"geoPointValue": {"latitude": 37.4, "longitude": -122.1}} Defensive patterns
Strategy: validation
Validate before calling
func validGeoPoint(m map[string]any) bool {
lat, lok := m["latitude"].(float64)
lng, gok := m["longitude"].(float64)
return lok && gok
} Type guard
func asGeoPoint(v any) (lat, lng float64, ok bool) {
m, mok := v.(map[string]any); if !mok { return }
lat, lok := m["latitude"].(float64); lng, gok := m["longitude"].(float64)
return lat, lng, lok && gok
} Try / catch
if _, err := JSONToFirestoreValue(val, client); err != nil {
if strings.Contains(err.Error(), "invalid geopoint value format") { /* normalize keys/numeric types and retry */ }
} Prevention
- Use exactly "latitude" and "longitude" key names
- Ensure coordinates are JSON numbers, not strings
- Validate geopoints with a schema (e.g. JSON Schema) before conversion
When it happens
Trigger: Passing {"geoPointValue": {"lat": 37.4, "lng": -122.1}} (wrong key names), {"geoPointValue": {"latitude": "37.4", "longitude": "-122.1"}} (strings not numbers), or {"geoPointValue": "37.4,-122.1"} (not a map).
Common situations: Clients use abbreviated key names (lat/lng); coordinates arrive as strings from CSV or form inputs; the whole geopoint is serialized as a "lat,lng" string.
Related errors
- no document found
- description is required for tool %q
- description is required for tool %q
- Toolbox binary not found
- Invalid number input for ${NAME}: ${RAW_VALUE}
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/d0eafc3676ed15ab.
Report an issue: GitHub.