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. A miss also reports if the native exists in the other game (GTA5/FiveM) — do not call those in RedM — and says so when it is in neither database (likely fabricated).

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / natives / items / additionalProperties
      Previous value: -falseNew value: +{}
    • addedOutput schema / properties / natives / items / properties / descriptionSource
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / natives / items / required
      Previous value: -[
      -  "name",
      -  "hash",
      -  "namespace",
      -  "returnType",
      -  "params",
      -  "description",
      -  "path",
      -  "heading",
      -  "matchType",
      -  "content",
      -  "findings",
      -  "warnings",
      -  "refDocs"
      -]New value: +[
      +  "name",
      +  "hash",
      +  "namespace",
      +  "returnType",
      +  "params",
      +  "description",
      +  "descriptionSource",
      +  "path",
      +  "heading",
      +  "matchType",
      +  "content",
      +  "findings",
      +  "warnings",
      +  "refDocs"
      +]
  2. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "hint": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "natives": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "content": {
      +            "type": "string"
      +          },
      +          "description": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "findings": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "id": {
      +                  "type": "number"
      +                },
      +                "snippet": {
      +                  "type": "string"
      +                },
      +                "title": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "title",
      +                "snippet"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "hash": {
      +            "type": "string"
      +          },
      +          "heading": {
      +            "type": "string"
      +          },
      +          "matchType": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "namespace": {
      +            "type": "string"
      +          },
      +          "params": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "path": {
      +            "type": "string"
      +          },
      +          "refDocs": {
      +            "items": {
      +              "additionalProperties": {},
      +              "propertyNames": {
      +                "type": "string"
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "returnType": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "warnings": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "hash",
      +          "namespace",
      +          "returnType",
      +          "params",
      +          "description",
      +          "path",
      +          "heading",
      +          "matchType",
      +          "content",
      +          "findings",
      +          "warnings",
      +          "refDocs"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "enum": [
      +        "hit",
      +        "suggestions",
      +        "cross_domain",
      +        "miss"
      +      ],
      +      "type": "string"
      +    },
      +    "suggestions": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "hash": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "namespace": {
      +            "type": "string"
      +          },
      +          "similarity": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "hash",
      +          "namespace",
      +          "similarity"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "natives",
      +    "suggestions",
      +    "hint"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/destructive/openWorld, but the description adds substantial behavior beyond them: exact-first with ILIKE substring fallback, the shape of the response (findings[], refDocs[]), the inline-vs-fetch branching for refDocs, and miss behavior including cross-game and 'in neither database' reporting.

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?

Purpose and trigger conditions are front-loaded, and almost every clause carries actionable information. It is nonetheless a long block of prose that would scan better as short bullets for the findings/refDocs workflow.

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 lookup tool with a rich output schema, the workflow guidance (follow findings[].id via get_document, run refDocs[].fetch when content is null) is exactly the extra context an agent needs to act on results, and the miss semantics prevent dead-end retries.

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?

Adds meaning beyond the 75%-covered schema: hash accepts 0x-prefixed or bare and is case-insensitive, and name resolves exact first then falls back to ILIKE substring. It does not address the limit parameter or reiterate namespace scoping beyond the schema's own text.

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+resource (resolve a RedM/RDR3 SCRIPT native by hash or name) and immediately characterizes it as O(1), exact. It also distinguishes its domain from siblings by explicitly ruling out game-data hashes and routing those to grep_docs.

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?

Gives concrete trigger patterns (Citizen.InvokeNative(0x...), GetHashKey('NAME'), SCREAMING_SNAKE_CASE names in Lua/JS/TS) and a clear when-not with an alternative ('NOT for game-data hashes … use grep_docs'). It also warns not to call GTA5/FiveM-only hits from RedM.

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.

Resources