Skip to main content
Glama
putervision
by putervision

query_entities

Read-onlyIdempotent

Find spatial entities by keyword, type, region, proximity, tags, or status; or retrieve a single entity's location and movement history by ID.

Instructions

Find entities by keyword query (FTS5 search), type, region, spatial proximity, tags, or status. Alternatively, provide entity_id for single-entity location and historical trajectory lookup. Read-only. Returns {ok, count, entities[]}. Use query_entities instead of get_spatial_map when searching for specific subsets rather than exporting the full topology.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoFilter by matching tags
typeNoFilter by entity type
limitNoMaximum number of entities to return (default: 50)
queryNoFull-text search query across entity names, tags, and properties
statusNoFilter by status
projectNoOptional project identifier
entity_idNoSpecific entity ID to look up directly (returns location and state)
region_idNoFilter by region ID
max_distanceNoMaximum distance radius from near_position
history_limitNoMaximum number of history events to return when include_history is true (default: 20)
near_positionNoCenter position for proximity distance search
min_confidenceNoMinimum confidence score (e.g. 0.5 to filter out decayed entities)
include_historyNoIf true and entity_id is specified, returns recent movement/event history

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.1
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / near_position / additionalProperties
      Removed value: -true
  2. First observedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower; the description reinforces 'Read-only' and adds the return envelope {ok, count, entities[]} plus the dual-mode behavior (search vs direct entity_id lookup with history). It doesn't mention pagination or cost limits, but the added context is meaningful.

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?

Front-loaded with the primary search purpose, then the alternate mode and return shape, then the sibling routing. Three dense sentences with no filler, though it is slightly packed for a single paragraph.

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

Completeness5/5

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

For a 13-parameter, zero-required read tool with no output schema, the description supplies the return shape, the two invocation modes, and the sibling boundary. An agent has enough to select it and choose the right parameter family.

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 100%, so every one of the 13 parameters is already documented in the schema; the description only paraphrases the filter categories. No syntax, format, or interaction details (e.g., include_history requiring entity_id) are added beyond what the schema states, so the baseline 3 applies.

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?

States a precise verb (find entities) plus the full set of filter dimensions (keyword/FTS5, type, region, proximity, tags, status) and a distinct alternate mode via entity_id. It explicitly differentiates itself from the sibling get_spatial_map by scope (subset search vs full topology export).

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

Usage Guidelines5/5

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

Names the alternative tool and the condition selecting it ('Use query_entities instead of get_spatial_map when searching for specific subsets rather than exporting the full topology'), and explains the second usage mode (entity_id for single-entity lookup and trajectory). Both when-to-use paths are explicit.

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