Skip to main content
Glama

weights_from_shapefile

Generate spatial weights matrices from shapefiles using contiguity methods for geographic analysis. Specify queen or rook adjacency and optional observation IDs to calculate spatial relationships between geographic features.

Instructions

Create a spatial weights (W) from a shapefile using contiguity.

  • contiguity: 'queen' or 'rook' (default 'queen')

  • id_field: optional attribute name to use as observation IDs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shapefile_pathYes
contiguityNoqueen
id_fieldNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 burden of behavioral disclosure. It states the tool creates spatial weights, implying a computation or transformation, but doesn't disclose critical behaviors: whether it modifies the input shapefile, requires specific permissions, has performance or memory considerations, or what the output entails (e.g., format, size). For a tool with no annotations, this leaves significant gaps in understanding its operational impact.

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?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by bullet points for key parameters. Every sentence earns its place by providing essential information without redundancy or fluff. It's efficient and well-structured for quick comprehension.

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 the tool's complexity (spatial analysis with 3 parameters), no annotations, and an output schema present (which reduces the need to explain return values), the description is partially complete. It covers the purpose and some parameters but lacks usage guidelines, behavioral details, and full parameter semantics. This is adequate as a minimum viable description but has clear gaps that could hinder effective tool selection and invocation.

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?

The schema description coverage is 0%, so the description must compensate. It adds meaning for two parameters: 'contiguity' (explaining it as 'queen' or 'rook' with a default) and 'id_field' (describing it as optional for observation IDs). However, it doesn't cover 'shapefile_path', the required parameter, leaving its purpose and format unspecified. With 3 parameters and partial coverage, this meets the baseline for adding some value but not fully compensating for the schema gap.

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's purpose: 'Create a spatial weights (W) from a shapefile using contiguity.' It specifies the verb ('Create'), resource ('spatial weights'), and method ('from a shapefile using contiguity'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'distance_band_weights' or 'knn_weights', which are also weights-related tools, so it doesn't reach the highest score.

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 provides no guidance on when to use this tool versus alternatives. It mentions the contiguity options ('queen' or 'rook') but doesn't explain when to choose one over the other or compare to other weights tools like 'distance_band_weights' or 'knn_weights'. There's no context on prerequisites, such as needing a valid shapefile, or exclusions, leaving the agent with minimal usage direction.

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