Skip to main content
Glama

Wait N frames

wait_frames
Read-only

Waits until the game’s main loop advances n frames so console commands, spawns, or SetPos changes take effect; returns frames and elapsed time, or times out if too few frames render.

Instructions

Waits until the game's main loop has run n more frames (counted by gmod-mcp every frame, map or not), e.g. to let a console command, a spawn or a SetPos take effect. Result: {frames, elapsed_s}. Error timeout if the game renders fewer frames in timeout_s (frozen, minimized with a low fps_max_nofocus). A light test client runs at 20 fps: 20 frames = 1 s.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "n": "<n>"
    },
    "name": "wait_frames"
  }
}

Input Schema

NameRequiredDescriptionDefault
nYesNumber of frames to wait.
instanceNoOptional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance.
timeout_sNoMax wait in seconds (default 30).

Output Schema

NameRequiredDescriptionDefault
nextNo
noteNo
framesYes
warningNo
elapsed_sYes
next_callNo
answered_byNo
truncated_noteNo
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the readOnlyHint/openWorldHint annotations, it discloses the failure mode and its cause ('Error timeout if the game renders fewer frames in timeout_s (frozen, minimized with a low fps_max_nofocus)') plus a concrete fps-to-wallclock conversion. What is left unexplained is whether frames advance while the game is paused or loading, which would matter for a timing-sensitive caller.

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?

Three sentences, front-loaded with the verb and unit, then use case, then failure mode, then a calibration anchor. Dense with no filler or restated name/title.

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, yet the description still names the return shape ({frames, elapsed_s}) and the error case, and it explains the frame-counting semantics that the schema cannot. For a 3-parameter timing tool, nothing an agent needs to call it correctly is missing.

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 100%, so the baseline is 3; the description earns above that by attaching real meaning to n via the '20 frames = 1 s at 20 fps' benchmark and by framing timeout_s as the condition under which the call errors rather than merely a max wait.

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 ('waits until the game's main loop has run n more frames') and pins down the unit and the counting source ('counted by gmod-mcp every frame, map or not'), which is exactly the distinction an agent needs versus a seconds-based wait.

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 concrete when-to-use trigger ('e.g. to let a console command, a spawn or a SetPos take effect'), which covers the main motivating cases. It stops short of explicitly contrasting itself with frame/time-based siblings like console_wait, events_wait or wait_for, so the routing is implied rather than stated.

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