Geography
Кодирует широту/долготу в шестиугольники Uber H3 (res 0-15) и ячейки Гильберта S2 Google (уровень 1-30): индекс, id, токен, quadkey, площади, k-ring, компакция, лестница родителей и дрейф в обе стороны.
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'http://127.0.0.1:3003/ru/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}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST http://127.0.0.1:3003/ru/api/tools/h3-and-s2-hexagonal-cell-index-encoder-and-neighbor-bridge| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| latitude | number | Да | — |
| longitude | number | Да | — |
| h3Resolution | number | Нет | — |
| s2Level | number | Нет | — |
| kRing | number | Нет | — |
| showCompact |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего 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": "Кодирует широту/долготу в шестиугольники Uber H3 (res 0-15) и ячейки Гильберта S2 Google (уровень 1-30): индекс, id, токен, quadkey, площади, k-ring, компакция, лестница родителей и дрейф в обе стороны.",
"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"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"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
}
}
}| checkbox |
| Нет |
| — |
HTML-результат
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Вопросы или проблемы? Свяжитесь с [email protected]