Skip to main content
Glama
nkarasiak

QGIS MCP

by nkarasiak

Spatial Join

spatial_join

Join attributes from one layer to another based on spatial relationships such as intersection or containment.

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?

No annotations are provided, so the description carries full burden. It discloses key behaviors: native algorithm name, predicate codes, method options, join fields default, and in-memory layer output if no output_path. This adds significant value beyond the schema, though it could mention error handling or performance implications.

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?

The description is a single run-on sentence that packs multiple details into one block. It is relatively concise but lacks structure (e.g., bullet points) and front-loads important info. Could be more readable and organized.

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 no output schema and 7 parameters, the description is insufficient. It misses required parameters and does not explain return values, error conditions, or performance characteristics. The tool is complex enough to warrant more thorough documentation.

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 description coverage is 0%, so description must compensate. It partially explains predicates, method, join_fields, and output_path, but omits the two required parameters (target_layer, join_layer) which are critical. The added meaning is incomplete, leaving the agent without full parameter understanding.

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 the tool performs a spatial join ('Join attributes by location'), which is distinct from attribute joins like those in add_table_join. The verb 'join' and resource 'attributes by location' are specific and unambiguous.

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

Usage Guidelines4/5

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

The description implies use for spatial joins, contrasting with attribute joins (sibling add_table_join). While it doesn't explicitly state when not to use or list alternatives, the context is clear given the sibling tool list. No exclusions are provided, but the primary use case is evident.

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/nkarasiak/qgis-mcp'

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