Skip to main content
Glama

Flecs Get Pipeline Stats

flecs_get_pipeline_stats
Read-onlyIdempotent

Retrieve per-system timing statistics from the FLECS stats module to analyze pipeline performance, including sync points, with configurable sampling and history.

Instructions

[READ] Get per-system timing statistics from the FLECS stats module.

'entries' contains one object per system: 'name', 'disabled', 'time_spent' and (for non-task systems) 'matched_entity_count' and 'matched_table_count', each metric as {avg, min, max}. With a pipeline, sync points ('multi_threaded', 'immediate', 'time_spent', 'commands_enqueued') are interleaved in execution order. Times are in seconds. Requires the stats module (FlecsStats).

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.
pipelineNoDotted path of a pipeline, e.g. 'flecs.pipeline.BuiltinPipeline', to get its systems in execution order including sync points. Omit to get all systems (unordered).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodYes
entriesYes
historyYes
pipelineYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuine behavioral context beyond that: the FlecsStats module prerequisite, units (seconds), and the interleaving of sync points in execution order with a pipeline.

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 core purpose, then structured detail on the entries payload and pipeline behavior. Every sentence carries information; slightly dense but no filler.

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 an output schema and full annotation coverage, the description only needs to frame purpose and behavior, which it does well, including the prerequisite module and return-field semantics. The main omission is comparative routing to sibling stats tools.

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 100%, so 'period', 'history' and 'pipeline' are already documented in the schema. The description reinforces pipeline ordering and the seconds unit but adds little syntax or semantics beyond what the schema fields state; 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 specific verb and resource ('Get per-system timing statistics from the FLECS stats module') with clear scope, and is readily distinguishable from the sibling flecs_get_world_stats by being per-system rather than world-level.

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?

Mentions the required stats module and explains that supplying a pipeline yields ordered systems including sync points, which is useful context. However, it never explicitly states when to prefer this over flecs_get_world_stats or the other stats/list siblings, leaving the choice to inference.

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