Filter a layer (direct)
filter_layerNarrow a layer to features matching a structured predicate. append:true (default) conjoins with any existing filter; append:false replaces the chain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| append | No | Default true. false replaces the layer's existing filter chain. | |
| intent | No | Optional. Which mental model is this filter operating under? "narrow" = generic shrink-the-set; "isolate-outliers" = pull out anomalies for inspection; "compare-subset" = pre-step before a side-by-side compare; "preview-data" = exploratory peek; "other" = none of the above. | |
| map_id | Yes | ||
| layerId | Yes | id of the layer to filter | |
| predicate | Yes | Predicate in the Mongo-shape grammar. Examples: {op:"eq",field:"category",value:"cafe"}, {op:"gt",field:"magnitude",value:5}, {op:"within",geometry:{type:"Polygon",coordinates:[...]}}, {op:"and",children:[...]}. See docs/superpowers/specs/2026-04-17-workspace-ops-log-design.md §6. | |
| rationale | Yes | Short audit-log label (≤300 chars) stating the user-facing goal this call serves, e.g. "add wildfire layer for the user's California query". Required on every call. Stored in the operations log so map edits stay traceable — we never see your chat history. |