Skip to main content
Glama
GIS MCP Server
by mahdin75

build_and_transform_weights

Build spatial weights matrices in memory with queen, rook, distance-band, or KNN methods, and apply transformations for spatial analysis.

Instructions

Build and transform spatial weights in memory. method is queen, rook, distance_band, or knn.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "data_path": "<data_path>"
    },
    "name": "build_and_transform_weights"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNo
binaryNo
methodNoqueen
id_fieldNo
data_pathYes
thresholdNo
transform_typeNor

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.16.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed9 schema fields changedv1.0.0
    • removedInput schema / properties / binary / title
      Removed value: -"Binary"
    • removedInput schema / properties / data_path / title
      Removed value: -"Data Path"
    • removedInput schema / properties / id_field / title
      Removed value: -"Id Field"
    • removedInput schema / properties / k / title
      Removed value: -"K"
    • removedInput schema / properties / method / title
      Removed value: -"Method"
    • removedInput schema / properties / threshold / title
      Removed value: -"Threshold"
    • removedInput schema / properties / transform_type / title
      Removed value: -"Transform Type"
    • removedInput schema / title
      Removed value: -"build_and_transform_weightsArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  3. First observed

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. 'In memory' usefully signals that nothing is persisted, but it says nothing about whether the resulting weights object is returned, permission or CRS prerequisites, or whether the operation is reversible or destructive.

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

Conciseness3/5

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

Two sentences, front-loaded and free of filler, which is good structurally. However, given a 7-parameter tool, the brevity reads as under-specification rather than disciplined conciseness.

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?

With 7 parameters at 0% schema coverage, no annotations, and no output schema, the description leaves an agent unable to call this correctly without guessing at required combinations (e.g., k for knn, threshold for distance_band). Only the method parameter is meaningfully covered.

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

Parameters2/5

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

Schema coverage is 0% across 7 parameters, so the description must compensate. It does add real value for one parameter by enumerating the method options (queen, rook, distance_band, knn), which the schema leaves as an unconstrained string, but k, threshold, binary, id_field, transform_type, and data_path remain completely undocumented.

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?

States a specific verb and resource ('Build and transform spatial weights') plus a scoping qualifier ('in memory') that distinguishes it from the sibling that saves weights to disk. It does not explicitly name alternatives, but the resource and scope are unambiguous.

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?

There is no when-to-use or when-not-to-use guidance: nothing says when to pick this in-memory variant over build_transform_and_save_weights, distance_band_weights, or knn_weights. The method enumeration hints at capability, but the agent must infer the selection criteria.

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