Skip to main content
Glama

merge_layers

Combine vector layers of identical geometry type into a single new layer, with automatic handling of field schema mismatches.

Instructions

Merge multiple vector layers of the same geometry type into one new layer.

Fails with GeometryTypeMismatch if the layers don't all share one geometry type. crs defaults to the first layer's CRS if omitted. Returns schema_conflicts: field names that aren't present on every input layer (missing values are left null on features from layers that lack that field).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
crsNo
nameNo
layer_namesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description fully takes on behavioral disclosure. It reveals error conditions (GeometryTypeMismatch), default behavior (crs), and output features (returns `schema_conflicts` with nulls for missing fields). It could be improved by stating that original layers are not modified.

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 uses four sentences with no wasted words. The core purpose is front-loaded in the first sentence, followed by clear details on failure, defaults, and output. Every sentence serves a distinct purpose.

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 an output schema exists, the description need not detail return values, but it does mention `schema_conflicts`. It covers key edge cases (geometry mismatch, crs default, missing fields). Missing details about attribute handling beyond conflicts (e.g., duplicate field values, feature merging strategy) leave minor gaps.

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

Parameters4/5

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

Schema coverage is 0%, so the description is the sole source of parameter meaning. It explains `crs` default behavior and implicitly clarifies `layer_names` via context. However, `name` (the output layer name) is not described at all. The description adds value by explaining geometry type constraint and schema conflict output, partially compensating for the lack of schema documentation.

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 starts with a clear verb ('Merge') and specifies the resource ('multiple vector layers') and condition ('of the same geometry type'). It distinctly separates this tool from siblings like filter, clip, and reproject by focusing on combining layers into one.

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?

Explicitly states that the tool fails with GeometryTypeMismatch if layers don't share a geometry type, implying it should only be used for same-type layers. It also notes `crs` defaults to the first layer's CRS. However, it does not explicitly contrast when to use merge versus other operations like append or union.

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

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