Skip to main content
Glama

Flecs Run Named Query

flecs_run_named_query
Read-onlyIdempotent

Run an existing named query, system, or observer to return the entities it matches now, helping verify what a system processes.

Instructions

[READ] Return what an existing named query, system or observer matches now.

Useful to check which entities a system processes. Same result format as flecs_query: {page, results, type_info?}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docNoInclude flecs.doc information (doc names, descriptions).
nameYesDotted path of an existing named query, system or observer, as listed by flecs_list_queries (e.g. 'game.systems.Move').
limitNoMaximum number of items to return.
tableNoReturn every tag, pair and component of each matched entity (same format as flecs_get_entity) instead of only the query fields.
fieldsNoInclude per-term field data ('fields') for each result.
offsetNoNumber of items to skip (for paging).
valuesNoInclude component values.
inheritedNoWith table=true: include components inherited from prefabs.
type_infoNoInclude the reflection schema of the returned components.
variablesNoOptional values for query variables as 'var:entity' pairs, e.g. 'parent:Sun' or 'x:e1,y:e2'.
entity_idsNoInclude numeric entity ids ('id').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
resultsYes
type_infoNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is fully covered and the '[READ]' tag is largely redundant. The description does add the snapshot semantics ('matches now') and points to the result shape {page, results, type_info?}, which the annotations do not. No contradiction 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?

Three short sentences, front-loaded with the read marker and core purpose, then use case, then return format. Nothing is padded, though the '[READ]' tag duplicates the annotation rather than earning its place.

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 a full output schema and rich annotations, the description only needs to convey purpose, usage, and return shape, and it does all three. It stops short of routing between siblings (flecs_query vs. this vs. flecs_list_queries), which is the one gap an agent might still need.

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% across all 11 parameters, including good detail on 'name' (dotted path, example, cross-reference to flecs_list_queries) and the interplay between table/inherited/values. The description adds no parameter-level meaning beyond this, so the baseline 3 is correct.

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 and resource ('Return what an existing named query, system or observer matches') and names the key constraint that the query already exists by name. It partially distinguishes itself from flecs_query by noting the shared result format, though it never explicitly contrasts the two (ad-hoc vs. named), leaving sibling differentiation implied rather than stated.

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?

'Useful to check which entities a system processes' gives one concrete scenario, which is better than nothing. But there is no explicit when-to-use/when-not guidance, no mention of when to prefer this over flecs_query or flecs_list_queries, and no prerequisites (e.g. that the name must come from flecs_list_queries). Usage is implied rather than directed.

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