Skip to main content
Glama

Query features from a layer (read-only)

query_features
Read-onlyIdempotent

Evaluate a predicate against a layer's inline features and return the matching subset. No Op is emitted and the workspace is not mutated. Handy for introspection ("how many X match Y?") before deciding whether to filter, subset, or build a new layer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoDefault 100, max 1000. Response sets `truncated:true` when clipped.
map_idYes
layerIdYes
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.
rationaleNoOptional short label (≤300 chars) for the map edit history, e.g. "add wildfire layer". Omit it to send nothing beyond the tool arguments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / rationale / description
      Previous value: -"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."New value: +"Optional short label (≤300 chars) for the map edit history, e.g. \"add wildfire layer\". Omit it to send nothing beyond the tool arguments."
    • changedInput schema / required
      Previous value: -[
      -  "map_id",
      -  "layerId",
      -  "predicate",
      -  "rationale"
      -]New value: +[
      +  "map_id",
      +  "layerId",
      +  "predicate"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and non-open-world, so the safety profile is covered. The description reinforces this and adds a valuable app-specific trait: no Op is emitted and the workspace is not mutated, which matters in this ops-log model. It doesn't cover pagination/return-shape behavior beyond the schema's truncation note.

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?

Three tight sentences, front-loaded with the core action and scope, then the read-only guarantee, then the use case. Every sentence earns its place with no redundant restatement of the name or schema.

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?

With no output schema, the description notes it returns the matching subset and the schema exposes the limit/truncated contract, so an agent has enough to invoke it. It could say more about the return shape (fields, ordering), but for a read-only query with rich annotations it is largely complete.

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 coverage is 60%: limit and predicate are well documented (the predicate grammar and examples live in the schema), while map_id and layerId are bare strings. The description alludes to evaluating a predicate but adds no syntax, format, or per-parameter meaning beyond what the schema already provides, so the baseline of 3 fits.

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

Purpose4/5

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

States a specific verb (evaluate a predicate) and resource (a layer's inline features) plus the result (the matching subset), which is unambiguous. It lightly frames itself against filtering/subsetting/new-layer siblings, though it never names the concrete alternative like filter_layer. An agent can tell what it does but must infer the contrast from the context.

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?

Clearly positions the tool as introspection ("how many X match Y?") to run before deciding to filter, subset, or build a new layer. That gives concrete when-to-use context absent from the schema. It stops short of explicit when-not or naming the sibling to use instead, so it's not a full 5.

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.

Resources