TL
API & MCPDokumentasyon

Platform ng Agent at API ng Mariner GPS Tools

Basahin at i-format ang mga coordinate

Mag-convert sa pagitan ng decimal degrees at degrees, minutes, at seconds (DMS).

Mga interface

POST
REST endpoint/api/v1/coordinates/convert
MCP
Pangalan ng toolconvert_coordinates

Kahilingan

Ipadala ang kahilingan bilang JSON. Ang mga kliyente ng MCP ay pumasa sa parehong mga field bilang mga argumento ng tool.

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"
}'
Humiling ng katawanjson
{
  "latitude": "51.5074",
  "longitude": "-0.1278",
  "format": "dms"
}

Tugon

Binabalot ng REST ang resulta ng pagkalkula sa karaniwang sobre ng tagumpay. Ibinabalik ng MCP ang parehong data ng pagkalkula bilang structured na output ng tool.

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"
  }
}

Mga scheme

Ang mga kahulugan sa ibaba ay nagpapakita ng kumpletong JSON Schema na ginamit upang patunayan ang mga input at ilarawan ang mga output.

Input schema

{
  "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"
  ]
}

Output schema

{
  "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 at MCP dokumentasyon