Skip to main content
Glama
QGIS MCP

QGIS MCP

by nkarasiak

Create Processing Model

create_processing_model

Build a QGIS Processing Model (.model3) from a structured spec defining inputs, algorithm steps, and outputs, then register it in the Processing Toolbox for reuse.

Instructions

Build QGIS Processing Model (.model3) from structured spec; save to user models folder, register in Processing Toolbox. Only call needed: algorithm discovery + param validation run in the plugin against the live registry, so do NOT call list_processing_algorithms or get_algorithm_help first. Pass keyword ('buffer') or full id ('native:buffer'); handler resolves it. Ambiguous hint returns candidate list to refine and retry. Bad param/output names reported with the valid set.

Spec: inputs: [{name, type, description?, default?, optional?, parent_layer? (for field/distance), options? (for enum)}]. Types: vector, feature_source, raster, field, number, integer, distance, string, boolean, extent, crs, point, file, folder, enum, multiple_layers. steps: [{id, algorithm, description?, parameters: {ALG_PARAM: value}}]. algorithm = keyword or full id. Param values: '@input_name' = model input value '$step_id.OUTPUT' = earlier step output '=expression' = QGIS expression ('=$area'). Expression params (FORMULA, EXPRESSION) get it as text, evaluated per feature; others get its value per run else = static literal (number/bool/string/list) outputs: [{name, from_step, from_output, description?}] = exposed outputs; omit to expose the last step OUTPUT as 'Result'.

Name collision appends a suffix (name_2.model3, ...). Response returns the actual 'name', the 'requested_name', and 'resolved_steps' (which algorithm each hint mapped to).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "steps": "<steps>"
    },
    "name": "create_processing_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
groupNoModels
stepsYes
inputsNo
outputsNo
descriptionNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: it discloses filesystem side effects (writes .model3 to the user models folder), registry mutation (appears in the Processing Toolbox), collision handling (name_2.model3 suffixing), and error surfaces (invalid param/output names returned with the valid set). Nothing about the write profile is left implicit.

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?

Front-loaded with a one-line summary before the spec block, and every spec line encodes a rule the agent must know. The second sentence ('Only call needed: algorithm discovery + param validation run in the plugin against the live registry...') is slightly convoluted, but the overall structure of prologue plus typed reference block is efficient for the complexity involved.

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?

For a six-parameter, deeply nested authoring tool with 0% schema coverage and no annotations, this is complete: inputs, steps, outputs, expression semantics, default output behavior, collision naming, and the response shape (name, requested_name, resolved_steps) are all covered despite an output schema existing.

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?

Schema description coverage is 0%, yet the description fully compensates: it enumerates the input types (vector, feature_source, field, distance, extent, crs, multiple_layers, etc.), explains the '@input_name', '$step_id.OUTPUT', '=expression', and static-literal value grammars, and defines optional fields like parent_layer and options. This is meaning the schema's bare object/array shapes cannot convey.

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 opening clause names a specific verb and artifact: 'Build QGIS Processing Model (.model3) from structured spec', and adds the lifecycle ('save to user models folder, register in Processing Toolbox'). This clearly separates it from execution siblings like run_model and execute_processing, which run models rather than author them.

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

Usage Guidelines5/5

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

Explicit when-not guidance: 'do NOT call list_processing_algorithms or get_algorithm_help first', justified by discovery/validation happening in-plugin against the live registry. It also tells the agent what to do on failure modes (ambiguous hint returns candidates to refine and retry), removing any guesswork about the call sequence.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools