Skip to main content
Glama

create-point

Generate point geometries from coordinates using PostGIS MCP Server. Input longitude and latitude to create spatial data with an optional SRID for custom projection.

Instructions

Koordinatlardan nokta geometrisi oluştur

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latitudeYesEnlem koordinatı
longitudeYesBoylam koordinatı
sridNoSpatial Reference System ID (varsayılan: 4326)

Implementation Reference

  • Handler for 'create-point' tool: validates input using CreatePointSchema, executes PostGIS query with ST_MakePoint to create point geometry, returns WKT, GeoJSON, coordinates, and SRID.
    case "create-point": { const { longitude, latitude, srid } = CreatePointSchema.parse(args); const result = yield client.query(` SELECT ST_AsText(ST_SetSRID(ST_MakePoint($1, $2), $3)) as wkt, ST_AsGeoJSON(ST_SetSRID(ST_MakePoint($1, $2), $3)) as geojson `, [longitude, latitude, srid]); const response = { wkt: result.rows[0].wkt, geojson: JSON.parse(result.rows[0].geojson), coordinates: [longitude, latitude], srid: srid, }; return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
  • Zod validation schema for 'create-point' tool inputs: requires longitude and latitude (numbers), optional srid (default 4326).
    const CreatePointSchema = zod_1.z.object({ longitude: zod_1.z.number(), latitude: zod_1.z.number(), srid: zod_1.z.number().optional().default(4326), });
  • server.js:81-102 (registration)
    Registration of 'create-point' tool in ListTools handler: specifies name, description, and input schema matching the Zod schema.
    { name: "create-point", description: "Koordinatlardan nokta geometrisi oluştur", inputSchema: { type: "object", properties: { longitude: { type: "number", description: "Boylam koordinatı", }, latitude: { type: "number", description: "Enlem koordinatı", }, srid: { type: "number", description: "Spatial Reference System ID (varsayılan: 4326)", }, }, required: ["longitude", "latitude"], }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/receptopalak/postgis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server