Skip to main content
Glama

sjoin_gpd

Perform a spatial join between two geospatial files using a user-defined predicate and join type. Combines attributes from the right dataset with the left based on spatial relationships like 'intersects' or 'within'.

Instructions

Spatial join between two GeoDataFrames using geopandas.sjoin. Args: left_path: Path to the left geospatial file. right_path: Path to the right geospatial file. how: Type of join ('left', 'right', 'inner'). predicate: Spatial predicate ('intersects', 'within', 'contains', etc.). output_path: Optional path to save the result. Returns: Dictionary with status, message, and output info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
left_pathYes
right_pathYes
howNoinner
predicateNointersects
output_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations, the description must disclose behavior. It only says it performs a spatial join and returns a dictionary, but does not mention if it modifies input files, requires specific permissions, or handles large datasets. No contradictions, but insufficient disclosure.

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

Conciseness4/5

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

The description is well-structured with Args and Returns sections, providing clear organization. It is fairly concise given the parameter count, though the 'Args' block adds minor redundancy.

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?

The description covers inputs and return type, but omits details like default behavior when output_path is null, whether intermediate files are created, and any limitations on file formats. An output schema exists but is not referenced.

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 partially compensates by listing each parameter with a brief explanation. However, it lacks details on allowed values for 'how' and 'predicate' beyond examples, and no format for paths.

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 explicitly states 'Spatial join between two GeoDataFrames using geopandas.sjoin', which is a specific verb+resource. It clearly distinguishes from nearby siblings like sjoin_nearest_gpd.

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 such as overlay_gpd or merge_gpd. It does not mention scenarios where spatial join is appropriate or when to choose a different predicate.

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