select_features_by_expression
Select features in a QGIS layer by applying an expression (e.g., 'pop' > 1000). Control how the selection combines with existing selections using modes like set, add, intersect, or remove.
Instructions
Select features on a layer matching a QGIS expression, e.g. "pop" > 1000.
mode controls how the match combines with any existing selection: "set"
(replace, default), "add", "intersect", or "remove". Returns the total
selected count and a preview of matched feature ids (capped; the count
is always exact even when the id list is truncated).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | set | |
| expression | Yes | ||
| layer_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||