Skip to main content
Glama

Filter a layer (direct)

filter_layer

Narrow a layer to features matching a structured predicate. append:true (default) conjoins with any existing filter; append:false replaces the chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appendNoDefault true. false replaces the layer's existing filter chain.
intentNoOptional. 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_idYes
layerIdYesid of the layer to filter
predicateYesPredicate 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.
rationaleYesShort 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.

TDQS

A4.1/5.0
Behavior4/5

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

The description adds context beyond annotations: it explains the 'append' default behavior, the 'rationale' audit-log requirement, and references the Mongo-shape grammar for predicates. No contradictions with annotations.

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 two sentences, front-loaded with the purpose, and efficiently covers key behaviors. Slightly more structure could be added, but it's well within acceptable limits.

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

Completeness4/5

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

Given six parameters (four required) and no output schema, the description adequately covers the tool's operation. It explains the filter chain behavior, predicate grammar, and rationale requirement. No major gaps.

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

Parameters4/5

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

With schema coverage at 83%, the description adds value by detailing 'append' behavior (conjunct vs replace), 'rationale' purpose (audit log), and providing predicate examples. This goes beyond the schema's property descriptions.

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 clearly states the verb 'narrow' and the resource 'layer features matching a structured predicate.' It distinguishes from siblings like 'clear_filters' or 'select_within' by specifying the structured predicate condition.

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

Usage Guidelines3/5

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

The description explains the 'append' parameter behavior (conjunct vs replace) but does not explicitly state when to use this tool over alternatives like 'select_within' or 'clear_filters'. No exclusion criteria or prerequisites are provided.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have clearly distinct purposes, but a few pairs such as select_within/focus_area and correlate_layers/add_fusion_layer overlap in function, differing mainly by input type or output (read vs. write). The descriptions adequately explain these differences, so agents can distinguish them with careful reading.

Naming Consistency5/5

Tool names consistently follow a verb_noun snake_case pattern (add_layer, filter_layer, export_image, remove_annotation). Minor exceptions like undo/redo/tag are conventional single verbs and do not detract from the overall predictability.

Tool Count4/5

At 25 tools, the server is on the heavy side, but each tool serves a distinct operation in a comprehensive mapping workspace—covering creation, editing, analysis, export, and history. The number feels justified by the broad feature set rather than excessive.

Completeness4/5

The toolset covers the full lifecycle of layers and workspace state, including add/remove/rename/restyle/filter, build/get/mutate/undo/redo, export, and tagging. Minor gaps such as annotation editing, layer reordering, or direct data updates exist, but they are not critical blockers for typical workflows.

Resources