Skip to main content
Glama

wait_for

Read-only

Polls FiveM state every 250 ms until one condition matches: NUI focus, NUI text/selector, server or client log regex, or resource start/stop state. Use it to synchronize test steps with the game.

Instructions

Wait until exactly one condition holds, polling every 250 ms: nuiFocused, nui (text or selector present/absent in a resource's NUI), serverLog or clientLog (regex on new lines), or resourceState.

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": "wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
nuiNo
playerNo
serverNo
clientLogNo
serverLogNo
timeoutMsNo
nuiFocusedNo
resourceStateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare a safe read-only, non-destructive operation. The description adds the 250 ms polling interval and condition-type semantics, but omits important behavior such as timeout handling, return values, and what happens if zero or multiple condition types are supplied.

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?

A single front-loaded sentence with no wasted wording. It packs the core purpose, polling cadence, and condition types efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex tool with 8 parameters, nested objects, and no output schema. The description covers condition types but is missing timeout semantics, return-value behavior, and the parameter-level requiredness implied by 'exactly one condition,' leaving meaningful gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage across 8 parameters, the description must carry the burden. It explains several condition parameters (nui, serverLog, clientLog, nuiFocused, resourceState) but leaves player, server, and timeoutMs unexplained, and does not clarify the exact-one-condition parameter constraint.

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: 'Wait until exactly one condition holds,' then enumerates the condition types. This clearly distinguishes it from immediate-action siblings such as nui_snapshot or client_get_logs.

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?

The description implies when to use the tool by specifying the wait-for-condition use case, but it gives no explicit when-not-to-use guidance or named alternatives. The 'exactly one condition' constraint is useful but not a full usage policy.

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