Skip to main content
Glama

execute_processing

Run QGIS processing algorithms with specified parameters to perform geospatial analysis and data manipulation tasks.

Instructions

Execute a processing algorithm with the given parameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algorithmYes
parametersYes

Implementation Reference

  • The primary MCP tool handler for 'execute_processing'. This function is decorated with @mcp.tool() and proxies the processing request to the underlying QGIS socket server.
    def execute_processing(ctx: Context, algorithm: str, parameters: dict) -> str:
        """Execute a processing algorithm with the given parameters."""
        qgis = get_qgis_connection()
        result = qgis.send_command("execute_processing", {"algorithm": algorithm, "parameters": parameters})
        return json.dumps(result, indent=2)
  • The core implementation in the QGIS plugin that executes the actual QGIS processing algorithm using processing.run().
    def execute_processing(self, algorithm, parameters, **kwargs):
        """Execute a processing algorithm"""
        try:
            import processing
            result = processing.run(algorithm, parameters)
            return {
                "algorithm": algorithm,
                "result": {k: str(v) for k, v in result.items()}  # Convert values to strings for JSON
            }
        except Exception as e:
            raise Exception(f"Processing error: {str(e)}")
  • Internal registration of the execute_processing handler in the QGIS plugin's command handlers dictionary.
    handlers = {
        "ping": self.ping,
        "get_qgis_info": self.get_qgis_info,
        "load_project": self.load_project,
        "get_project_info": self.get_project_info,
        "execute_code": self.execute_code,
        "add_vector_layer": self.add_vector_layer,
        "add_raster_layer": self.add_raster_layer,
        "get_layers": self.get_layers,
        "remove_layer": self.remove_layer,
        "zoom_to_layer": self.zoom_to_layer,
        "get_layer_features": self.get_layer_features,
        "execute_processing": self.execute_processing,
        "save_project": self.save_project,
        "render_map": self.render_map,
        "create_new_project": self.create_new_project,
    }
Behavior2/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 of behavioral disclosure. It states the tool executes a processing algorithm but doesn't reveal if this is read-only, destructive, requires specific permissions, has rate limits, or what the output might be. For a tool with zero annotation coverage and potential side effects, this is a significant gap in transparency.

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 a single, efficient sentence with no wasted words, making it appropriately sized. However, it's under-specified rather than concise, as it lacks necessary details for clarity, slightly reducing its effectiveness.

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 complexity (2 parameters with nested objects, no output schema, and no annotations), the description is incomplete. It doesn't cover behavioral traits, parameter details, or output expectations, leaving the agent with insufficient information to use the tool effectively in context with siblings.

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 description mentions 'algorithm' and 'parameters' but adds minimal meaning beyond the input schema, which has 0% description coverage. It doesn't explain what an 'algorithm' refers to (e.g., QGIS processing tool), the structure of 'parameters,' or provide examples, failing to compensate for the schema's lack of documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Execute[s] a processing algorithm with the given parameters,' which provides a basic verb+resource (execute + processing algorithm). However, it's vague about what 'processing algorithm' entails and doesn't distinguish it from siblings like 'execute_code' or 'render_map,' which might involve similar processing concepts.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., after loading a project), or exclusions, leaving the agent to guess based on sibling names like 'execute_code' or 'render_map' without explicit direction.

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/syauqi-uqi/qgis_mcp_modify1'

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