Skip to main content
Glama

nui_act

Destructive

Simulate clicks, typing, key presses, hovering, or scrolling on a FiveM resource's NUI. Target elements by snapshot ref, CSS selector, or visible text and get a fresh snapshot back.

Instructions

Act on a resource's NUI: click, hover, type (value; submit presses Enter), key (value, e.g. Escape) or scroll (value = pixels). Target by ref from nui_snapshot, CSS selector or visible text. Returns a fresh snapshot.

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": {
      "resource": "<resource>",
      "action": "<action>"
    },
    "name": "nui_act"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
textNo
valueNo
actionYes
submitNo
resourceYes
selectorNo
settleMsNo
snapshotNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=false, so the safety profile is covered. The description adds behavior the annotations don't: the tool returns a fresh snapshot, and 'submit presses Enter' warns that some actions can trigger side effects. It still does not say what damage could occur or how long it waits for the UI to settle.

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 tight sentences with the action list front-loaded, then targeting, then return behavior. No filler or redundancy.

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

Completeness3/5

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

For a nine-parameter destructive tool with no output schema, the description covers action semantics, targeting, and the returned snapshot, which is a good foundation. However, gaps remain around the required resource parameter, the settleMs wait and snapshot toggle, and the choice between targeting modes, which matter for correct invocation.

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?

With 0% schema description coverage across nine parameters, the description carries the burden. It explains the action enum, the per-action meaning of value (text for type/key, pixels for scroll), submit, and the three targeting modes (ref, selector, text), but omits resource (required), settleMs, snapshot, and whether the targeting options are mutually exclusive.

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?

The description gives a specific verb and resource (act on a resource's NUI) and enumerates the five supported actions with their value semantics, so an agent knows exactly what the tool does. Referencing nui_snapshot for refs also separates it from the read-only sibling.

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 establishes the workflow: obtain a ref from nui_snapshot, then act, or fall back to a CSS selector or visible text. It does not say when NOT to use this tool (e.g., for reading UI state or running script inside the NUI, which nui_eval may cover), so alternatives are only partially addressed.

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