Skip to main content
Glama

Flecs Get Entity

flecs_get_entity
Read-onlyIdempotent

Retrieve a FLECS entity's tags, relationship pairs, and component values as JSON. Use it to inspect entity details after finding entities with flecs_query.

Instructions

[READ] Get one entity with its tags, relationship pairs and component values.

Returns the FLECS entity JSON: 'parent', 'name', 'tags' (list), 'pairs' (relationship -> target), 'components' (component -> value; null when the component has no reflection data) and, when requested, 'id', 'type_info', 'inherited', 'matches' and doc info. Names use full paths.

Errors when the entity does not exist. Use flecs_query to find entities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docNoInclude flecs.doc information (doc names, descriptions).
entityYesEntity path in FLECS dotted notation, e.g. 'Sun.Earth' or 'flecs.core.World' (the 'parent' and 'name' fields of a query result joined with '.'), or a numeric entity id such as '#523'. Escape a literal '.' inside a name as '\.'.
valuesNoInclude component values.
matchesNoInclude the queries, systems and observers that match this entity ('matches'). Useful to find out why a system does or does not process an entity.
entity_idNoInclude the numeric entity id ('id').
inheritedNoInclude tags/components inherited from prefabs (IsA).
type_infoNoInclude the reflection schema of the returned components.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the bar is lower. The description adds real value beyond them: it errors when the entity does not exist, components are null when there is no reflection data, names are full paths, and entity_id/type_info/inherited/matches/doc are opt-in outputs.

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 [READ] prefix and a one-line purpose, followed by a compact enumeration of return fields and a closing routing sentence. The return-field list is somewhat lengthy given an output schema exists, but every sentence carries information and nothing is padded.

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 7-parameter read tool with full schema coverage, complete annotations and an output schema, the description covers purpose, alternative routing, error behavior and return shape. An agent has everything needed to invoke it correctly.

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 parameter including escaping of literal '.' and the '#523' numeric-id form is already documented in the schema. The description only restates that optional fields are included 'when requested', adding no syntax or format detail beyond the structured fields.

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 opens with a specific verb and resource ('Get one entity') plus the [READ] tag, and enumerates exactly what is returned (tags, relationship pairs, component values). It also names a sibling ('flecs_query') so an agent can differentiate read-one from search-many without opening a schema.

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?

It gives explicit guidance: use flecs_query to find entities, and use the 'matches' flag to diagnose why a system does or does not process an entity. It stops short of an explicit when-not-to-use rule, but the routing to the alternative is clear.

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