Skip to main content
Glama

Delete Features

delete_features
Destructive

Delete features from a QGIS layer by feature IDs or an expression filter, returning the requested and measured deleted counts.

Instructions

Delete features by feature IDs or expression filter. Provide either fids (list of ints) or expression (string), not both. Returns requested and the measured deleted count.

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": {
      "layer_id": "<layer_id>"
    },
    "name": "delete_features"
  }
}

Input Schema

NameRequiredDescriptionDefault
fidsNo
layer_idYes
expressionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, so the destructive nature is known. The description adds useful context about the return value ('requested and the measured deleted count') but does not disclose other behavioral aspects such as irreversibility, interaction with undo, or effects on related data.

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 with no filler. The core action, input constraints, and return information are all front-loaded and compact.

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

Completeness3/5

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

For a destructive tool with no output schema and no parameter-level schema descriptions, the description could do more. It omits expression format details, what happens if neither fids nor expression is provided, and any notes on undoing or committing the deletion. The return count is helpful, but key invocation edge cases are unresolved.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It explains that fids is a list of ints and expression is a string, and that they are mutually exclusive. However, it does not specify the expression syntax or clarify whether at least one of fids/expression must be provided, and layer_id is left undescribed.

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 uses a specific verb ('Delete') and resource ('features') and clearly identifies the two modes of operation: by feature IDs or by expression filter. This distinguishes it from sibling tools like delete_field and add_features/update_features.

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 operational guidance by stating that either fids or expression should be provided, and not both. It does not explicitly name alternatives or exclusion conditions, but the conditions for invoking the tool are evident from the description.

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