Skip to main content
Glama

flexsim_table_from_snapshot

Writes simulation statistics into a GlobalTable for charting or analysis. Supports single snapshot or timeseries mode.

Instructions

Write a statistics snapshot into a GlobalTable (window backend only). # T6

Puente documentado snapshot -> GlobalTable -> (chart a mano). Esto NO bindea
el chart GUI (imposible verificado: grep 2026-09-26 en repo y Commands.xml no
hallo patron collector->chart; ver bloque P3 y flexsim_chart_bind_stat): solo
deja los numeros en Tools/GlobalTables/<table> para graficar fuera o alimentar
el chart a mano con los manual_steps de flexsim_chart_bind_stat.

snapshot: _collect_statistics una vez -> UNA fila de datos + header
  (metricas como columnas object_metric + time) via la misma rutina de
  escritura que flexsim_table_write (_write_table_block duplicado 15 lineas
  para no tocar su comportamiento).
timeseries: SIN reset (destruiria el estado): 3 snapshots consecutivos con
  stoptime now+60/120/180 desde el tiempo actual + columna time (header + 3
  filas). Corrida con el patron de flexsim_run_to_time/chart_snapshot
  (Run Speed 1000 + stoptime + applicationcommand run + espera getrunstate==0).

Args:
    table: GlobalTable destino (^[A-Za-z0-9_]+$, se crea si falta).
    statistics: GetStatisticsInput o None (mismos defaults: metricas basicas).
    mode: snapshot (default) o timeseries.

Returns JSON {table, rows, cols, mode} (+ error en JSON-siempre cuando falla).
Limite: el chart GUI se alimenta a mano (manual_steps de chart_bind_stat);
tablas >100x20 devuelven error (TABLE_MAX_ROWS/COLS de table_write).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden and does so: window-backend-only scope, table auto-creation, timeseries mode deliberately skips reset because it would destroy state, the 3-snapshot stoptime recipe, and the >100x20 hard error from TABLE_MAX_ROWS/COLS. Destructive implications and operational limits are both disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core statement is front-loaded but is immediately buried under Spanish prose, an internal ticket marker '# T6', a grep-date justification, and a parenthetical about duplicated 15-line code. Much of this is engineering rationale irrelevant to an invoking agent, making the definition far longer than its usable content.

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?

An output schema exists, so return values need not be detailed, yet the description still names them ({table, rows, cols, mode}). Modes, defaults, limits, and the window-only constraint are all present. Only the nested statistics parameters remain under-explained relative to the tool's surface area.

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 description coverage is 0% at the property level, so the description must compensate. It documents table (created if missing, must match ^[A-Za-z0-9_]+$), statistics (defaults to basic metrics, same defaults as the shared routine), and mode (snapshot default vs timeseries). This meaningfully fills the schema gap, though it does not exhaustively explain the GetStatisticsInput fields (metrics/objects/include_time).

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 opening sentence gives a specific verb and resource: 'Write a statistics snapshot into a GlobalTable (window backend only)'. It distinguishes itself from flexsim_table_write (same write routine) and flexsim_chart_bind_stat (what it explicitly does NOT do), so an agent can place it among siblings. The clutter of ticket IDs and verification notes slightly muddies the statement.

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 states the intended use clearly: leave numbers in Tools/GlobalTables/<table> to plot externally or feed the chart manually via the manual_steps of flexsim_chart_bind_stat. It also carves out what it is not for ('Esto NO bindea el chart GUI') and redirects to the binding tool. It stops short of an explicit 'use snapshot vs timeseries when' rule, but the context is clear.

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

Deploy Server

Other Tools