centroid

Pack: coordinates · Endpoint: https://gateway.pipeworx.io/coordinates/mcp

Average (spherical) center of a list of lat/lon points. points is an array of {lat, lon}.

Parameters

NameTypeRequiredDescription
pointsarrayyesArray of {lat, lon} objects.

Example call

Arguments

{
  "points": [
    {
      "lat": 40.7128,
      "lon": -74.006
    },
    {
      "lat": 34.0522,
      "lon": -118.2437
    },
    {
      "lat": 41.8781,
      "lon": -87.6298
    }
  ]
}

curl

curl -X POST https://gateway.pipeworx.io/coordinates/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"centroid","arguments":{"points":[{"lat":40.7128,"lon":-74.006},{"lat":34.0522,"lon":-118.2437},{"lat":41.8781,"lon":-87.6298}]}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('centroid', {
  "points": [
    {
      "lat": 40.7128,
      "lon": -74.006
    },
    {
      "lat": 34.0522,
      "lon": -118.2437
    },
    {
      "lat": 41.8781,
      "lon": -87.6298
    }
  ]
});

More examples

{
  "points": [
    {
      "lat": 51.5074,
      "lon": -0.1278
    },
    {
      "lat": 48.8566,
      "lon": 2.3522
    }
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "coordinates": {
      "url": "https://gateway.pipeworx.io/coordinates/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 15, 2026