Skip to main content
Glama
nkarasiak

QGIS MCP

by nkarasiak

Create PostgreSQL Connection

create_postgresql_connection

Create a PostgreSQL connection in QGIS using an existing authentication config. Validates database reachability and actual port; fails if name exists or DB unreachable.

Instructions

Validate and save a new PostgreSQL Browser-panel connection. Credentials must be held in an existing QGIS Authentication Manager configuration; passwords are never accepted. Fails if name already exists or the database cannot be reached. port must be the actual database port supplied by the caller or user - this tool does not assume a default such as 5432. ssl_mode is one of prefer (default), disable, allow, require, verify-ca, or verify-full.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
nameYes
portYes
databaseYes
ssl_modeNoprefer
auth_config_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses that the operation validates and saves, that passwords are not permitted, that it fails under specific conditions, and it clarifies unusual behaviors like requiring an explicit port and the valid ssl_mode values.

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 compact and front-loaded, with every sentence providing essential information. It covers purpose, key constraints, validation behavior, and parameter-specific rules without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of annotations and a present output schema, the description is remarkably complete. It covers prerequisites, success/failure conditions, parameter semantics, and important edge cases, leaving no critical ambiguity for an agent deciding how to invoke the tool.

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

Parameters5/5

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

The input schema has 0% description coverage, but the description adds substantial meaning: it explains port must be the actual port with no default, enumerates ssl_mode options and its default, links auth_config_id to the Authentication Manager requirement, and warns about duplicate names. This fully compensates for the bare schema.

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 'Validate and save a new PostgreSQL Browser-panel connection,' which is a specific verb and resource with clear scope. It differentiates from sibling tools like list_connections or add_layer_from_connection by indicating it creates a new connection rather than reading or using existing ones.

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?

The description gives clear contextual guidance: it specifies prerequisites (credentials must be in QGIS Authentication Manager), explicitly states passwords are never accepted, and explains failure conditions (duplicate name or unreachable database). It does not explicitly name alternative tools or state when not to use it, but the context is clear enough.

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