Skip to main content
Glama

merge_gpd

Merge two shapefiles by joining on shared attribute columns with left, right, outer, or inner joins. Preserves geometry from the left shapefile and outputs a single combined shapefile.

Instructions

Merges two shapefiles based on common attribute columns, This function performs a database-style join, not a spatial join. Args: left_shapefile_path: Path to the left shapefile. The geometry from this file is preserved. right_shapefile_path: Path to the right shapefile to merge. output_path: Path to save the merged output shapefile. how: Type of merge. One of 'left', 'right', 'outer', 'inner'. Defaults to 'inner'. on: Column name to join on. Must be found in both shapefiles. left_on: Column name to join on in the left shapefile. right_on: Column name to join on in the right shapefile. suffixes: Suffix to apply to overlapping column names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shapefile1_pathYes
shapefile2_pathYes
output_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/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. It explains the operation type (merge based on attributes), preserves left geometry, and writes to output_path. However, it lacks details on potential side effects, error handling, or prerequisites like CRS alignment.

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 fairly concise yet includes structured parameter docs. It doesn't waste words, though the mismatch in parameter names adds unnecessary confusion. It could be slightly tighter by aligning with schema names.

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?

Given the tool's complexity (merge with multiple join options) and schema with only 3 params, the description's parameter mismatch and lack of details on join keys (on, left_on, etc.) leave gaps. An output schema exists, so return values aren't needed, but prerequisites like attribute existence are missing.

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?

The input schema has 3 parameters with zero description coverage. The description adds meaning by describing parameters like left_shapefile_path and how, but these names mismatch the schema (shapefile1_path, shapefile2_path). The additional parameters not in the schema further complicate understanding, making the description less useful for the actual tool interface.

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 it merges two shapefiles based on common attribute columns and distinguishes it from a spatial join. However, the parameter names in the description (left_shapefile_path, right_shapefile_path) do not match the actual schema (shapefile1_path, shapefile2_path), which could cause confusion.

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 explicitly notes it performs a database-style join, not a spatial join, which hints at appropriate usage compared to sibling spatial join tools. However, it does not provide explicit when-to-use or when-not-to-use guidance, nor mention alternatives like sjoin_gpd.

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