Skip to main content
Glama

GIS MCP Server

ols_with_spatial_diagnostics_safe

Perform spatial diagnostics and run Ordinary Least Squares (OLS) regression on geospatial datasets. Input shapefiles or GeoPackages, specify dependent and independent variables, and optionally define spatial weights for analysis.

Instructions

Safe MCP pipeline: Read shapefile, build/load W, convert numeric, check NaNs, run OLS. Parameters: - data_path: path to shapefile or GeoPackage - y_field: dependent variable column name - x_fields: list of independent variable column names - weights_path: optional path to existing weights file (.gal or .gwt) - weights_method: 'queen', 'rook', 'distance_band', or 'knn' (used if weights_path not provided) - id_field: optional attribute name to use as observation IDs - threshold: required if method='distance_band' - k: required if method='knn' - binary: True for binary weights (DistanceBand only)

Input Schema

NameRequiredDescriptionDefault
binaryNo
data_pathYes
id_fieldNo
kNo
thresholdNo
weights_methodNoqueen
weights_pathNo
x_fieldsYes
y_fieldYes

Input Schema (JSON Schema)

{ "properties": { "binary": { "default": true, "title": "Binary", "type": "boolean" }, "data_path": { "title": "Data Path", "type": "string" }, "id_field": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Id Field" }, "k": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "K" }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Threshold" }, "weights_method": { "default": "queen", "title": "Weights Method", "type": "string" }, "weights_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Weights Path" }, "x_fields": { "items": { "type": "string" }, "title": "X Fields", "type": "array" }, "y_field": { "title": "Y Field", "type": "string" } }, "required": [ "data_path", "y_field", "x_fields" ], "title": "ols_with_spatial_diagnostics_safeArguments", "type": "object" }

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/mahdin75/gis-mcp'

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