Skip to main content
Glama

Lookup RedM native by hash or name

lookup_native
Read-only

Resolve a RedM/RDR3 SCRIPT native by hash or name — O(1), exact. Use whenever you see Citizen.InvokeNative(0x...), Citizen.invokeNative('0x...'), GetHashKey('NAME'), or a SCREAMING_SNAKE_CASE native name (e.g. SET_ENTITY_COORDS, GetPedHealth) in Lua/JS/TS. NOT for game-data hashes (weapon/ped/animation names) — use grep_docs. Pass hash (0x… optional, case-insensitive) or name (exact first, ILIKE substring fallback). Returns name, hash, namespace, return type, params, description, full content, plus findings[] — community gotchas linked to that native. Inspect findings[].id and call get_document({path: 'learning:<id>'}) for full body. Also returns refDocs[] — enum/flag value tables for that native (the constants to pass for params like flagId/attributeIndex/eventType). When refDocs[].content is set, it's the inline enum table — use those values directly. When content is null but refDocs[].fetch is present, the table was too large to inline — run that exact call (e.g. get_document({ path: "refdoc:eEventType" })) to get the full table; refDocs[].preview shows the first lines. github entries (no fetch) are url-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashNoNative hash, e.g. 0x09C28F828EE674FA (case-insensitive, 0x optional)
nameNoNative name, e.g. CAN_PLAYER_START_MISSION. Substring match if no exact hit.
limitNo
namespaceNoRestrict to a namespace, e.g. PLAYER, ENTITY. Only used with `name`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintYes
statusYes
nativesYes
suggestionsYes

TDQS

A4.8/5.0
Behavior5/5

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

Annotations mark readOnlyHint=true, but the description adds rich behavioral detail: exact-first then ILIKE substring fallback, return structure including findings and refDocs, and how to handle inline vs fetch-based enum tables. No contradiction with annotations.

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?

The description is long but dense with actionable detail; every major aspect (use case, return, refDocs handling) is covered without fluff. It could be slightly trimmed, but its length is justified by the tool's complexity.

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?

For a tool with no required params and a rich output, the description covers input ambiguity, output interpretation, and integration with get_document via findings ids and refDoc fetch paths. Combined with annotations and output schema, an agent has all needed context.

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 covers 75% of parameters, but description adds critical semantics: hash is case-insensitive, name uses exact-first with ILIKE fallback, and namespace is restricted to name queries. The limit parameter is only covered by schema, though its numeric min/max/default suffice.

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 exactly what it does: resolves a RedM/RDR3 SCRIPT native by hash or name with O(1) exact match. Clearly differentiates from game-data hash lookups by explicitly pointing to grep_docs, making its scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use triggers (Citizen.InvokeNative calls, GetHashKey, SCREAMING_SNAKE_CASE names) and a clear negative case (weapon/ped/animation hashes → grep_docs). Names the alternative tool and describes fallback behavior.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool targets a distinct retrieval mode: structured asset lookup, script native resolution, exact token grep, semantic search, doc navigation, raw line access, and contribution. Descriptions explicitly cross-reference 'NOT for' cases, making misselection unlikely even where overlap exists.

Naming Consistency3/5

Names mix verb-object (lookup_native, get_document, read_lines), object-verb (asset_lookup), bare verbs (browse), and descriptive phrases (semantic_search). The verb 'lookup' appears as both suffix and prefix, and 'get'/'read' are used interchangeably for retrieval, though all names are lowercase snake_case and readable.

Tool Count5/5

10 tools is well-scoped for a documentation and reference server. Each tool fills a clear niche with no obvious bloat or redundancy, staying comfortably within the ideal 3-15 range.

Completeness5/5

The surface covers the full lifecycle of documentation access: orientation (list_namespaces), discovery (browse), exact and semantic search, native/asset lookup, full-content retrieval (get_document), raw line reading for large tables (read_lines), a calling-convention guide, and community contribution (share_finding). Known limitations in the data layer are addressed with companion tools.