JA
API & MCPドキュメント

Mariner GPS Tools エージェント & API プラットフォーム

座標を解析して書式化

十進法と度・分・秒(DMS)形式の間で変換します。

インターフェース

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 signed decimal degrees, decimal degrees with N/S (33.8688° S), degrees and decimal minutes, or DMS. Do not combine a sign with a hemisphere letter."
    },
    "longitude": {
      "type": "string",
      "description": "Longitude as signed decimal degrees, decimal degrees with E/W (4.15° W), degrees and decimal minutes, or DMS. Do not combine a sign with a hemisphere letter."
    },
    "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 ドキュメント