Geography
Codifica lat/lng en hexágonos Uber H3 (res 0-15) y celdas Hilbert S2 de Google (nivel 1-30): índice, id, token, quadkey, áreas, k-ring, compactación, escalera de padres y deriva de ida y vuelta.
Llama a esta herramienta desde tu código en tres lenguajes.
curl -X POST 'http://127.0.0.1:3003/es/api/tools/h3-and-s2-hexagonal-cell-index-encoder-and-neighbor-bridge' \
-H 'Content-Type: application/json' \
-d '{"latitude":37.7796,"longitude":-122.4194,"h3Resolution":9,"s2Level":14,"kRing":1,"showCompact":true}'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST http://127.0.0.1:3003/es/api/tools/h3-and-s2-hexagonal-cell-index-encoder-and-neighbor-bridge| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| latitude | number | Sí | — |
| longitude | number | Sí | — |
| h3Resolution | number | No | — |
| s2Level | number | No | — |
| kRing | number | No | — |
Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-h3-and-s2-hexagonal-cell-index-encoder-and-neighbor-bridge": {
"name": "h3-and-s2-hexagonal-cell-index-encoder-and-neighbor-bridge",
"description": "Codifica lat/lng en hexágonos Uber H3 (res 0-15) y celdas Hilbert S2 de Google (nivel 1-30): índice, id, token, quadkey, áreas, k-ring, compactación, escalera de padres y deriva de ida y vuelta.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=h3-and-s2-hexagonal-cell-index-encoder-and-neighbor-bridge",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "h3-and-s2-hexagonal-cell-index-encoder-and-neighbor-bridge",
"arguments": {
"latitude": 37.7796,
"longitude": -122.4194,
"h3Resolution": 9,
"s2Level": 14,
"kRing": 1,
"showCompact": true
}
}
}| showCompact |
| checkbox |
| No |
| — |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}¿Dudas o problemas? Contacta con [email protected]