Skip to main content
Glama
receptopalak

PostGIS MCP Server

by receptopalak

transform-coordinates

Convert spatial coordinates between systems using WKT geometry, source SRID, and target SRID for accurate mapping and analysis with the PostGIS MCP Server.

Instructions

Koordinat sistemini dönüştür

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometry_wktYesWKT formatında geometri
source_sridYesKaynak koordinat sistemi SRID
target_sridYesHedef koordinat sistemi SRID

Implementation Reference

  • Executes the transform-coordinates tool: validates input using TransformCoordinatesSchema, runs PostGIS ST_Transform query to convert geometry from source_srid to target_srid, returns transformed WKT and GeoJSON.
        case "transform-coordinates": {
            const { geometry_wkt, source_srid, target_srid } = TransformCoordinatesSchema.parse(args);
            const result = yield client.query(`
      SELECT 
        ST_AsText(ST_Transform(ST_GeomFromText($1, $2), $3)) as transformed_wkt,
        ST_AsGeoJSON(ST_Transform(ST_GeomFromText($1, $2), $3)) as transformed_geojson,
        $2 as source_srid,
        $3 as target_srid
    `, [geometry_wkt, source_srid, target_srid]);
            const response = {
                original_geometry: geometry_wkt,
                source_srid: source_srid,
                target_srid: target_srid,
                transformed_wkt: result.rows[0].transformed_wkt,
                transformed_geojson: JSON.parse(result.rows[0].transformed_geojson),
            };
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(response, null, 2),
                    },
                ],
            };
        }
  • Zod schema defining input parameters for the transform-coordinates tool: geometry_wkt (string), source_srid (number), target_srid (number).
    const TransformCoordinatesSchema = zod_1.z.object({
        geometry_wkt: zod_1.z.string(),
        source_srid: zod_1.z.number(),
        target_srid: zod_1.z.number(),
    });
  • server.js:145-157 (registration)
    Registers the transform-coordinates tool in the ListTools response, including name, description, and input schema matching the Zod schema.
    {
        name: "transform-coordinates",
        description: "Koordinat sistemini dönüştür",
        inputSchema: {
            type: "object",
            properties: {
                geometry_wkt: { type: "string", description: "WKT formatında geometri" },
                source_srid: { type: "number", description: "Kaynak koordinat sistemi SRID" },
                target_srid: { type: "number", description: "Hedef koordinat sistemi SRID" },
            },
            required: ["geometry_wkt", "source_srid", "target_srid"],
        },
    },
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does at a high level ('transform coordinate system') without revealing any behavioral traits: it doesn't mention whether this is a read-only operation, what happens to invalid inputs, whether it requires specific permissions, what the output format is, or any performance considerations. For a tool with 3 parameters and no annotations, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (two words in Turkish), but this is under-specification rather than effective brevity. It doesn't front-load critical information or provide any structured explanation. While technically short, it fails to convey necessary context, making it inefficient rather than appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (coordinate transformation with 3 required parameters), lack of annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, how errors are handled, or any behavioral nuances. The description should provide more context about the transformation process and expected outcomes to compensate for the missing structured data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all parameters clearly documented in the input schema (geometry_wkt, source_srid, target_srid). The description adds no additional parameter information beyond what the schema provides. According to the scoring rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description, which applies here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Koordinat sistemini dönüştür' (Transform coordinate system) is a tautology that essentially restates the tool name 'transform-coordinates' in Turkish. It doesn't specify what exactly gets transformed (geometries), how the transformation occurs, or what distinguishes it from sibling tools like 'calculate-distance' or 'geometry-intersection' that also work with spatial data. The purpose is stated but lacks specificity and differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools for spatial operations (e.g., 'create-point', 'geometry-intersection', 'calculate-distance'), but the description doesn't indicate this is specifically for coordinate system transformations rather than other geometric manipulations. No context, prerequisites, or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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