JA
API & MCPドキュメント

Mariner GPS Tools 開発者プラットフォーム

座標を解析して書式化

緯度・経度の形式を変換

インターフェース

POST
REST エンドポイント/api/v1/coordinates/convert
MCP
ツール名convert_coordinates

リクエスト

リクエストを JSON として送信します。 MCP クライアントは、同じフィールドをツール引数として渡します。

cURLshell
curl -X POST https://marinergps.tools/api/v1/coordinates/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "latitude": "51.5074",
  "longitude": "-0.1278",
  "format": "dms"
}'
リクエストボディjson
{
  "latitude": "51.5074",
  "longitude": "-0.1278",
  "format": "dms"
}

応答

REST は、計算結果を標準の成功エンベロープにラップします。 MCP は、構造化ツールの出力と同じ計算データを返します。

JSON
{
  "ok": true,
  "data": {
    "latitude": {
      "decimal": 51.5074,
      "formatted": "51° 30′ 26.640″ N"
    },
    "longitude": {
      "decimal": -0.1278,
      "formatted": "0° 07′ 40.080″ W"
    },
    "format": "dms"
  }
}

スキーマ

以下の定義は、入力の検証と出力の説明に使用される完全な JSON スキーマを示しています。

入力スキーマ

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "latitude": {
      "type": "string",
      "description": "Latitude as decimal degrees or DMS text."
    },
    "longitude": {
      "type": "string",
      "description": "Longitude as decimal degrees or DMS text."
    },
    "format": {
      "type": "string",
      "enum": [
        "decimal",
        "dms"
      ],
      "description": "Output coordinate format."
    }
  },
  "required": [
    "latitude",
    "longitude",
    "format"
  ]
}

出力スキーマ

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "latitude": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decimal": {
          "type": "number"
        },
        "formatted": {
          "type": "string"
        }
      },
      "required": [
        "decimal",
        "formatted"
      ]
    },
    "longitude": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "decimal": {
          "type": "number"
        },
        "formatted": {
          "type": "string"
        }
      },
      "required": [
        "decimal",
        "formatted"
      ]
    },
    "format": {
      "type": "string",
      "enum": [
        "decimal",
        "dms"
      ]
    }
  },
  "required": [
    "latitude",
    "longitude",
    "format"
  ]
}
API および MCP ドキュメント