Skip to main content
Glama

Performance snapshot

perf_snapshot
Read-only

Capture quick performance metrics such as FPS, frametimes, Lua memory, and entity counts from the game process across menu, client, and server realms.

Instructions

Quick performance numbers of this game process. Result: {frame: {fps, frametime_avg_ms, frametime_max_ms, samples} over the last 256 frames of the main thread, last_tick_age_s (seconds since the last frame: large = frozen), realms: {menu|client|server: {lua_memory_kb, entity_count, frametime, tick_interval, real_frametime (client)}}} for the realms that exist. Note the frame cap (status fps_max: 20 on a light test client). For per-hook costs use perf_hook_cost.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "perf_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
instanceNoOptional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance.

Output Schema

NameRequiredDescriptionDefault
nextNo
noteNo
frameYes
realmsYes
warningNo
next_callNo
answered_byNo
truncated_noteNo
last_tick_age_sYes
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true/openWorldHint=false, so the safety profile is covered; the description adds genuine value with interpretation hints ('last_tick_age_s ... large = frozen') and the frame-cap caveat. It does not disclose behavior for the relay-to-remote-instance path beyond what the schema says, nor any cost/latency of sampling.

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 purpose, then result shape, then the caveat and alternative. The nested brace notation for the return structure is dense but efficient; every clause carries information.

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?

For a single-optional-param read tool with an output schema and annotations, this is close to complete: it explains metric semantics (frozen detection), which realms appear ('for the realms that exist'), and the frame-cap caveat. Minor gaps are preconditions for calling it.

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?

Only one optional parameter, and schema coverage is 100% — the schema already explains the instance identifier and coordinator relay. The description adds nothing about the parameter, so the baseline of 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 resource ('performance numbers of this game process') and enumerates exactly what the snapshot contains — frame fps/frametime/samples over the last 256 frames, last_tick_age_s, and per-realm metrics. It also explicitly distinguishes itself from the sibling perf_hook_cost, so an agent can pick it without opening either 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?

Gives a clear routing rule: 'For per-hook costs use perf_hook_cost,' and points to status for fps_max context. It doesn't state exclusions or preconditions (e.g., whether a game must be running), which keeps it short of a 5.

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