Skip to main content
Glama

nui_snapshot

Read-only

Generates a compact text outline of a FiveM resource's visible NUI—text, headings, and interactive elements with refs—so you can inspect UI state and target elements with nui_act.

Instructions

Compact text outline of a resource's visible NUI: text, headings and interactive elements as [ref] role "label". Use refs with nui_act.

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>"
    },
    "name": "nui_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxCharsNo
resourceYes
selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered without description help. The description adds real context beyond that by specifying the output format and which element kinds appear in the outline. It says nothing about truncation, size limits, or what happens when nothing is rendered, so it does not exceed a moderate score.

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?

Two short sentences, front-loaded with the return format and ending with the actionable handoff to nui_act. There is no filler. It is arguably over-terse rather than padded, but the structure itself is efficient.

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?

With no output schema, the description does a fair job sketching the return value, and annotations cover the safety profile. However, for a three-parameter tool with zero schema coverage and a truncating maxChars option, the missing parameter and truncation semantics leave an agent under-informed. Adequate but with clear gaps.

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?

Schema description coverage is 0% across three parameters, so the description carries the full burden and does not meet it. Only 'resource' is implied by 'a resource's visible NUI'; 'selector' (scoping to a subtree) and 'maxChars' (truncation threshold with a 6000 default and 20000 cap) get no explanation of behavior or format. An agent must guess how truncation manifests in the returned outline.

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 description states a specific resource and return shape: a compact text outline of a resource's visible NUI containing text, headings, and interactive elements in '[ref] role "label"' form. It also implicitly separates itself from nui_act by noting that the emitted refs are consumed there. It stops short of a clean verb-first statement (e.g. 'capture/return'), so it is clear but not maximally sharp.

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 one guidance sentence, 'Use refs with nui_act', gives an explicit downstream handoff, which is genuinely useful. There is no statement of when to call this versus nui_eval or nui_list, no prerequisites, and no note on when the NUI must already be open.

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