Skip to main content
Glama

Flecs Get World Stats

flecs_get_world_stats
Read-onlyIdempotent

Retrieve performance metrics like FPS, frame time, entity and table counts from a running FLECS application. Requires the stats module to be imported.

Instructions

[READ] Get world performance statistics from the FLECS stats module.

'metrics' maps names such as 'performance.fps', 'performance.frame_time', 'entities.count', 'tables.count', 'queries.system_count', 'commands.add_count' and 'memory.alloc_count' to {avg, min, max, brief}. Times are in seconds. Requires the FLECS application to import the stats module (FlecsStats); returns an explanatory error otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodNoSampling window: '1s', '1m', '1h', '1d' or '1w'. Each window holds 60 samples.1s
historyNoReturn all 60 samples of the window (oldest first) instead of only the latest sample.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYes
historyYes
metricsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, so the safety profile is covered; the description goes further by disclosing the stats-module dependency, the graceful failure mode, and that all time values are in seconds. That is exactly the kind of environment/auth-style context the annotations cannot express.

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?

Two sentences, front-loaded with the [READ] marker and the core action, then the metric key examples and the prerequisite. No filler, no repetition of the schema's parameter text.

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?

An output schema exists, so the return-value description is a bonus rather than a requirement, and the description nonetheless sketches the metric map. Combined with the module prerequisite and failure behavior, an agent has everything needed to call this correctly.

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?

Schema coverage is 100%, so period and history are already fully documented in the schema and the baseline is 3. The description adds value above that baseline by explaining what the 'metrics' map keys look like and the {avg, min, max, brief} shape of each value, plus the seconds unit.

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?

The description opens with a specific verb+resource ('Get world performance statistics from the FLECS stats module') and enumerates the metric namespaces returned (performance.*, entities.*, tables.*, queries.*, commands.*, memory.*), which pins down the scope precisely. It does not explicitly distinguish itself from the sibling flecs_get_pipeline_stats, so it falls just short of full sibling differentiation.

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?

It states a prerequisite ('requires the FLECS application to import the stats module') and what happens when unmet ('returns an explanatory error otherwise'), which is genuinely useful gating information. However, it never says when to prefer this over flecs_get_pipeline_stats or flecs_get_world_info, so the use-case routing is only implied.

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