Skip to main content
Glama
GIS MCP Server
by mahdin75

weights_from_shapefile

Build queen or rook contiguity weights from a shapefile and return a neighbor summary instead of the full weights matrix.

Instructions

Build queen or rook contiguity weights. Returns a neighbor summary, not the full weights matrix.

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": {
      "shapefile_path": "<shapefile_path>"
    },
    "name": "weights_from_shapefile"
  }
}

Input Schema

NameRequiredDescriptionDefault
id_fieldNo
contiguityNoqueen
shapefile_pathYes

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. Changed5 schema fields changedv1.0.0
    • removedInput schema / properties / contiguity / title
      Removed value: -"Contiguity"
    • removedInput schema / properties / id_field / title
      Removed value: -"Id Field"
    • removedInput schema / properties / shapefile_path / title
      Removed value: -"Shapefile Path"
    • removedInput schema / title
      Removed value: -"weights_from_shapefileArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  3. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does deliver one important behavioral fact: the return is a neighbor summary, not the full weights matrix. However, it says nothing about where or whether anything is persisted, permission/file-format requirements, or error behavior for invalid geometries, leaving significant behavioral gaps for a mutation-adjacent build operation.

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

Conciseness5/5

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

Two short sentences with zero filler; the core purpose is front-loaded and the return-value caveat follows immediately. Nothing is wasted.

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?

For a three-parameter, no-output-schema, no-annotation tool, the description covers the essential purpose and the shape of the result, which is the most important missing piece. It still leaves id_field semantics and any file/persistence behavior unaddressed, so it is adequate but not complete.

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 0%, so the description must compensate. It does add real meaning for the contiguity parameter by naming the accepted values "queen" and "rook" (the schema lists no enums), but id_field is never mentioned and its null default and role as the feature identifier are left unexplained.

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 queen or rook contiguity weights") and implies the contiguity family of approaches, which distinguishes it from distance_band_weights and knn_weights by category. It does not explicitly name those siblings, so the differentiation is implicit rather than spelled out.

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 guidance, no prerequisite information, and no statement about when a queen versus rook choice is appropriate despite offering both. The agent must infer that a shapefile is the input and that this is the contiguity option among several weight-building siblings.

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