Skip to main content
Glama
nkarasiak

QGIS MCP

by nkarasiak

Import Layer to Connection

import_layer_to_connection
Destructive

Export a loaded vector layer to a database connection (PostgreSQL, GeoPackage) as a new table. Default prevents overwriting existing tables; enable overwrite to replace.

Instructions

Write a loaded vector layer into a saved connection as a new table (PostgreSQL, GeoPackage, ...). Fails if the table exists unless overwrite=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaNo
layer_idYes
providerYes
overwriteNo
connectionYes
Behavior3/5

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

The description adds a key safety behavior: 'Fails if the table exists unless overwrite=true', which complements the destructiveHint annotation by specifying the guardrail. Yet it does not detail what happens during overwrite (e.g., schema replacement) or permissions required, so coverage is moderate.

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 is two sentences, front-loaded with the primary action and followed by a concise safety note. Every word adds value, with no fluff or repetition of schema details.

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 6 parameters and no output schema, the description covers the essential operation and a key behavior. It misses details on the schema parameter and return values, but the core usage and safety are well addressed for a moderately complex tool.

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?

Despite 0% schema description coverage, the description explains the core parameters: layer_id (loaded vector layer), connection (saved connection), table (new table), provider (PostgreSQL/GeoPackage), and overwrite (true allows replacing existing table). The optional 'schema' parameter is not mentioned, but most key parameters receive meaningful context.

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 verb 'Write', the object 'a loaded vector layer', and the destination 'into a saved connection as a new table', with format examples (PostgreSQL, GeoPackage). This distinguishes it from sibling tools like add_layer_from_connection which perform the reverse operation.

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 when a layer is loaded and a connection is saved, and explicitly notes the failure condition when the table exists. However, it does not mention alternatives or exclusions, such as 'use execute_connection_sql instead for custom SQL', leaving some ambiguity.

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