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
feat(hex): fetch add_hex_tile_layer color-scale metadata by hash (#276) (#315)
Stop routing server-computed value_stats/bounds/value_column/layer_name through
the LLM's tool-call arguments — the surface GLM-5.2 corrupted on ca-30x30
(2026-07-14). add_hex_tile_layer now requires only tile_url and fetches the
metadata.json sidecar (mcp-data-server#316 serve_metadata) by content hash,
deriving the URL from tile_url via metadataUrlFromTileUrl.
- required: ['tile_url']; value_stats/bounds/value_column/layer_name are now
optional overrides; the description tells the model to pass only tile_url.
- resolveHexMetadata: prefer caller-supplied values (fast path, back-compat),
else fetch and fill gaps, else fall back to whatever was supplied. Returns a
clear error (never a silent blank layer) when neither source yields usable
stats, with a hint to ensure mcp-data-server >= v0.8.6.
Deploy ordering: the tile host must serve metadata.json (v0.8.6, promoted but
awaiting cluster rollout) BEFORE any app bumps its pin to this code.
Composes with #313 (dialect scrub recovers a leaked value_stats upstream; this
fetches when it is absent/invalid). Full suite 516 green.
- value_stats / bounds / layer_name accepted as explicit overrides, but normally OMIT — they are fetched
410
478
- format ← format ("geojson" or "vector"; defaults to "vector")
411
479
- geojson_url ← geojson_url (REQUIRED when format="geojson"; ignored otherwise)
412
480
413
-
ALWAYS pass \`format\` and (when present) \`geojson_url\` through. The server auto-selects GeoJSON for small/single-resolution tilesets and vector tiles otherwise; for GeoJSON the \`.pbf\` tile_url 404s, so the layer renders blank unless you also pass format="geojson" + geojson_url.
481
+
For GeoJSON tilesets you MUST still pass format="geojson" + geojson_url from the register_hex_tiles return — those two are NOT in the fetched sidecar. The server auto-selects GeoJSON for small/single-resolution tilesets and vector tiles otherwise; for GeoJSON the \`.pbf\` tile_url 404s, so the layer renders blank unless you also pass format="geojson" + geojson_url.
414
482
415
483
Hexes get finer as the user zooms in: the tile server's pyramid serves the appropriate H3 resolution for each zoom level automatically (vector format only). If the user wants a coarser overall view, re-run \`register_hex_tiles\` with the SQL projected to a coarser resolution by wrapping the first column in \`h3_cell_to_parent(<h3_col>, <target_res>)\` — the server auto-detects the H3 resolution from that column.
416
484
@@ -420,18 +488,18 @@ The returned layer_id can be used with show_layer / hide_layer / set_style / set
420
488
inputSchema: {
421
489
type: 'object',
422
490
properties: {
423
-
tile_url: {type: 'string',description: 'tile_url_template from register_hex_tiles'},
424
-
value_column: {type: 'string',description: 'Which column from register_hex_tiles.value_columns to style by (e.g. "count" for agg=COUNT)'},
491
+
tile_url: {type: 'string',description: 'tile_url_template from register_hex_tiles — the ONLY required field'},
492
+
value_column: {type: 'string',description: 'Optional: which column from value_columns to style by (default: first; "count" for agg=COUNT)'},
425
493
value_stats: {
426
494
type: 'object',
427
-
description: 'Per-resolution stats for value_column — pass register_hex_tiles.value_stats[value_column] directly. Shape: { by_res: { "<res>": { min, max } } }.'
495
+
description: 'Optional override — normally OMIT. Fetched automatically by content hash. Shape if passed: { by_res: { "<res>": { min, max } } }.'
428
496
},
429
497
bounds: {
430
498
type: 'array',
431
499
items: {type: 'number'},
432
-
description: '[w, s, e, n] from register_hex_tiles.bounds'
layer_name: {type: 'string',description: 'MVT source-layer name from register_hex_tiles.layer_name (defaults to "layer" when omitted; ignored for format="geojson")'},
502
+
layer_name: {type: 'string',description: 'Optional override — normally OMIT. Fetched automatically (defaults to "layer"; ignored for format="geojson").'},
435
503
format: {
436
504
type: 'string',
437
505
enum: ['vector','geojson'],
@@ -447,20 +515,22 @@ The returned layer_id can be used with show_layer / hide_layer / set_style / set
0 commit comments