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 only carry readOnlyHint/openWorldHint, but the description adds substantial behavior: matching order (exact then ILIKE fallback), the full return field set, the findings[]/refDocs[] secondary structures, the inline-vs-fetch protocol for oversized enum tables, and miss behavior (reports the other game's database or fabrication). This is well beyond what the annotations cover.

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 purpose and usage trigger lead the paragraph, then the return-shape details follow. It is long and dense, and the return-structure sentences could be tightened, but nearly every clause carries actionable routing or fetch information rather than filler.

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, a 4-param surface, and sibling ambiguity, the description covers retrieval, fallback behavior, secondary result structures, and the follow-up call needed for large enum tables. An agent has everything required to invoke it and interpret the response correctly.

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 coverage is 75%, and the description adds matching semantics the schema doesn't: hash is case-insensitive with optional 0x prefix, name is exact-first with ILIKE substring fallback, and namespace is only meaningful with name. It does not explain the `limit` param, but that is a minor gap given the schema's own description.

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 (resolve) and resource (RedM/RDR3 SCRIPT native) with the lookup key modes (hash or name) and performance characteristic (O(1), exact). It explicitly distinguishes itself from siblings grep_docs and get_document, so an agent can route without opening another schema.

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) and an explicit exclusion: game-data hashes for weapons/peds/animations go to grep_docs instead. When-to-use and when-not-to-use are both stated.

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.