Skip to main content
Glama

ols_with_spatial_diagnostics_safe

Run OLS regression with spatial diagnostics safely. Reads shapefile, builds spatial weights, converts numeric data, checks for NaN values, then executes regression.

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

TableJSON Schema
NameRequiredDescriptionDefault
data_pathYes
y_fieldYes
x_fieldsYes
weights_pathNo
weights_methodNoqueen
id_fieldNo
thresholdNo
kNo
binaryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description partially carries the behavioral transparency burden. It outlines the pipeline steps (read, build/load weights, convert numeric, check NaNs, run OLS) and notes the tool is 'safe'. However, it does not clarify what happens when NaNs are found, what 'convert numeric' entails, or error handling for missing parameters.

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

Conciseness4/5

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

The description is relatively concise: a one-line summary followed by a bulleted parameter list. It front-loads the purpose. However, the first sentence could be more streamlined (e.g., removing jargon like 'MCP pipeline'). Overall, it is clear and organized.

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

Completeness3/5

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

Given 9 parameters, no annotations, and no schema descriptions, the description covers all parameters and outlines the pipeline. However, it omits details on the output (though output schema exists), the exact diagnostics included, and behavior when both 'weights_path' and 'weights_method' are provided. It is adequate but has notable gaps.

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

Parameters4/5

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

Although the input schema has 0% description coverage, the tool's parameter list in the description adds meaningful explanations for all 9 parameters, such as specifying that 'data_path' is a path to shapefile or GeoPackage, and conditional requirements for 'threshold' and 'k'. This adds significant value beyond the schema types.

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

Purpose4/5

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

The description clearly states the tool performs an OLS pipeline with spatial diagnostics, including reading a shapefile, building/loading weights, converting numeric fields, checking NaNs, and running OLS. While it distinguishes from siblings by specifying a safe pipeline, it could be more specific about the spatial diagnostics output.

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

Usage Guidelines2/5

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

The description does not provide any guidance on when to use this tool versus alternatives like morans_i or simple OLS. No explicit when-to-use or when-not-to-use conditions are given, leaving the agent to infer from the name and parameter list.

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

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

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