Skip to main content
Glama
awheeler262
by awheeler262

Spatial Join

spatial_join

Join attributes from one layer to another based on spatial relationships like intersects, contains, or touches. Supports one-to-many or largest overlap methods.

Instructions

Join attributes by location (native:joinattributesbylocation). predicates int list: 0=intersects 1=contains 2=equals 3=touches 4=overlaps 5=within 6=crosses (default [0]). method: 0=one-to-many 1=first match (default) 2=largest overlap. join_fields = copied columns (default all). No output_path = in-memory layer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNo
prefixNo
join_layerYes
predicatesNo
join_fieldsNo
output_pathNo
target_layerYes
Behavior4/5

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

Since no annotations are provided, the description carries full burden. It discloses that the tool creates an in-memory layer if no output_path is given, and explains predicates and method options. It does not explicitly state it is non-destructive, but that is implied. This is sufficient for typical usage.

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 extremely concise and well-structured. Each key parameter is explained in a clear, bullet-like format without unnecessary words. Every sentence adds meaningful information.

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

Completeness4/5

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

Given the complexity of spatial join (7 parameters) and no output schema, the description covers all essential aspects: parameter defaults, meaning, and output behavior. It could mention CRS compatibility or error handling, but it is still nearly complete for practical use.

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

Parameters5/5

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

The schema has zero parameter descriptions, so the description must compensate. It does so excellently by explaining predicates (mapping integers to spatial relationships), method (three options with defaults), join_fields (copied columns, default all), and output_path behavior. This adds significant value beyond the raw schema.

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

Purpose5/5

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

The description clearly states 'Join attributes by location', which is a specific verb+resource. It distinguishes from sibling tools like 'add_table_join' (attribute join) by emphasizing spatial join. The native function name is provided for clarity.

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 explicit guidance on when to use this tool vs alternatives. It focuses solely on parameter details, with no mention of prerequisites, when not to use, or alternative methods like 'add_table_join' or 'execute_processing'.

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/awheeler262/qgis_mcp'

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