Skip to main content
Glama

sjoin_nearest_gpd

Perform a nearest neighbor spatial join between two geospatial files, matching features by minimum distance. Choose left or right join, set an optional maximum distance, and save the result to a specified path.

Instructions

Nearest neighbor spatial join using geopandas.sjoin_nearest. Args: left_path: Path to the left geospatial file. right_path: Path to the right geospatial file. how: Type of join ('left', 'right'). max_distance: Optional maximum search distance. 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
howNoleft
max_distanceNo
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 is the sole source of behavioral info. It only states the operation and parameters, but omits side effects (e.g., file creation, data mutation), permissions, performance implications, or error handling. The return type is vaguely described as 'Dictionary with status, message, and output info' without specifics.

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 concise with a clear structure (Args and Returns sections) and no superfluous content. However, the Returns section is vague and could be slightly more informative without losing conciseness.

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 5 parameters, no annotations, and an output schema (though not detailed in context), the description covers basic functionality but lacks guidance on output structure, edge cases, or integration with sibling tools. It is adequate for a straightforward tool but leaves several behavioral aspects unaddressed.

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 provides basic meanings for each parameter (e.g., 'Path to the left geospatial file'), going beyond just type definitions. However, it lacks details on formats, unit for max_distance, and default behaviors, making it minimally helpful but not thorough.

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 'Nearest neighbor spatial join using geopandas.sjoin_nearest', explicitly specifying the verb ('join') and the resource (geospatial data). It distinguishes itself from siblings like sjoin_gpd by emphasizing 'nearest neighbor', making the tool's unique purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage for nearest neighbor joins, but does not explicitly state when to use this tool over alternatives like sjoin_gpd (exact spatial join) or other operations. No when-to-use or when-not-to-use guidance is provided, leaving the agent to infer from the tool name and description.

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