Server definition
- Hash
- sha256:3fe3933e82f272fbdd49a19fc15f9a1bb001cb4b8a113048d987f97ae9cb4b02
- What it is
- What a remote MCP server returned when asked what it offers: 10 tools
The blob, as servednamed by its sha256
{
"instructions": "RedM/RDR3 docs server (natives + VORP + RSGCore + oxmysql + rdr3_discoveries + jo_libs + cfx runtime docs).\n\nDecision tree — pick the tool by what you have, not by topic:\n\n1. Script native — `Citizen.InvokeNative(0x...)`, `Citizen.invokeNative('0x...')`, `GetHashKey('NAME')`, or SCREAMING_SNAKE_CASE name (`SET_ENTITY_COORDS`, `GetPedHealth`)\n → `lookup_native({ hash })` or `lookup_native({ name })`. O(1), exact. Native hashes are 64-bit (`0x06843DA7060A026B`).\n\n2. Game-data asset — ped model (`a_c_bear_01`), weapon (`weapon_pistol_volcanic`), object/prop (`p_safe01x`), door (model name or numeric/hex hash), vehicle (`ArmySupplyWagon`). 32-bit jenkins hashes (`0xBCFD0E7F`).\n → `asset_lookup({ name })`, `asset_lookup({ hash })`, or `asset_lookup({ search, type? })`. O(1) structured — returns hash + canonical name + per-type metadata (peds: variants + relationship group, weapons: group, doors: coords + model hash). Use this instead of grepping `peds_list.lua` + cross-referencing `RELATIONSHIP/README.md`.\n\n3. Other exact literal token — a walkstyle/clipset (`MP_Style_Casual`, `mech_loco_m@`), a CPED config flag (`PCF_DisablePlayerAutoHolster`), a scenario key (`MAGGIE_SEAT_CHAIR_DESK_WRITING`), a jo_libs API symbol (`jo.menu.create`, `jo.callback.register`), an audio bank or animation dict name, or any string you'd grep for\n → `grep_docs({ pattern })`. REQUIRED for the largest rdr3_discoveries data tables (audio_banks, ingameanims_list, cloth_drawable_albedo_normal_material, cloth_hash_names, megadictanims, entity_extensions___particleEffect, imaps_with_coords, propsets_list, vehicle_bones) — those are only preview-indexed for embeddings, so `semantic_search` won't find tokens in them. Once grep returns a hit at `path:line` in one of these, read the surrounding block with `read_lines({ path, start, end })` — `get_document` can't slice arbitrary line ranges.\n\n4. Behavior / concept / \"how do I X\" — you don't know any specific name, just what you want (\"teleport player\", \"apply combat style\", \"spawn horse\", \"inventory add item\", \"show notification\", \"build a menu\")\n → `semantic_search({ query })`. Hybrid by default (vector + lexical fused via RRF) so it ALSO handles exact-token queries like `addItem`, `weapon_pistol_volcanic`, `MP_Style_Casual`. Optionally `mode=lexical` for pure BM25 or `mode=semantic` for pure vector. Optionally `category=vorp|rsgcore|oxmysql|natives|discoveries|jo_libs|cfx` to narrow. Community findings (`share_finding`) are merged into results by default; use `category=learnings` to return only findings.\n\n5. Enumerate what exists — `list_namespaces` (structure), `browse({ category, namespace })` (file paths).\n\n6. Have a known doc path — `get_document({ path })` for full markdown or a section `heading`; `read_lines({ path, start, end })` for an exact 1-based line range (e.g. reading around a `grep_docs` hit in a large or preview-only lua table, where `get_document` can't slice offsets). For individual natives prefer `lookup_native` instead.\n\n7. Solved something non-trivial that wasn't in the docs — `share_finding({ title, body })`. Helps the next agent. Skip if it's project-specific or you're guessing.\n\n8. About to write code that calls natives in JS/TS or Lua — `get_invoke_guide({ language })` ONCE per session. Loads the calling-convention reference (result modifiers, type mapping, gotchas) into context. Native doc pages only contain Lua examples; this guide is how you translate them to JS/TS correctly.\n\nRules:\n- ALWAYS resolve unknown hashes/names before suggesting changes around them — do not guess parameter order or types.\n- Exact tokens → grep, not semantic_search. \"shotgun hash\" → `grep_docs({ pattern: \"shotgun\", category: \"discoveries\" })`, not embeddings.\n- Concepts → semantic_search, not grep. \"how to damage a ped\" → semantic_search.\n- Framework calls (`exports.vorp_core:...`, `QBCore.Functions...`) → semantic_search with `category=vorp|rsgcore|oxmysql`.\n- jo_libs / Jump-On-Studios resources (`jo.*` API, framework-bridge, hooks/actions/filters, RedM scripts like housing/stable/camp-builder) → semantic_search or grep with `category=jo_libs`.\n- Cfx runtime & scripting API — `RegisterCommand`, the `exports` mechanism itself (`exports('name', fn)`, consuming another resource's export), `TriggerServerEvent`/`TriggerClientEvent`/`RegisterNetEvent`/`AddEventHandler`, statebags (`Entity(id).state`, `Player(src).state`, `GlobalState`), `fxmanifest.lua`, convars/`server.cfg`, OneSync, NUI (`SendNUIMessage`, `RegisterNUICallback`, `SetNuiFocus`), `Citizen.CreateThread`/`Wait`, server manual → semantic_search or grep with `category=cfx` (docs.fivem.net runtime docs; the engine is shared, so they apply to RedM). These are runtime globals, not game natives — `RegisterCommand`, `exports`, events, statebags have no hash, so `lookup_native` misses them (only CFX-namespace natives like `SetNuiFocus` resolve there) — and not framework docs (not vorp/rsgcore).\n- Hash and grep lookups are cheap — prefer over guessing.\n- lookup_native results include `warnings[]` — read them before writing code. They flag gotchas (Vector3 needs InvokeNative, entity-creation needs cleanup, `*` pointer params are buffers/out-slots, `*_THIS_FRAME`/`DRAW_*` are per-frame, etc.).\n- RedM string→hash: build Hash args from name strings with `GetHashFromString(name)` — the joaat-equivalent RedM global, NOT in the native list (distinct from its inverse `GET_STRING_FROM_HASH_KEY`). Needed for component categories, control actions, texture assets, blip colors, game-event names.\n- Vector3-returning natives MUST use Citizen.InvokeNative + Citizen.ResultAsVector() in JS/TS — the Lua wrapper doesn't exist.\n- Entity-spawning natives (CREATE_PED, CREATE_VEHICLE, …) — always null-check the return and register cleanup on resource stop.\n- Pool exhaustion, \"pool full\" crashes, how many entities can be spawned, `increase_pool_size` → `get_document({ path: \"guides/pool_size_limits.md\" })` — the Cfx-published RedM pool caps, regenerated from content.cfx.re at boot.\n- When a finding is linked to a native (findings[] in lookup_native results), read it — it documents a real gotcha someone hit in production.",
"tools": [
{
"description": "Resolve a RedM game-data asset (ped model, weapon, object, door, vehicle) by exact name, 32-bit hash, or partial-name search. O(1) structured lookup against pre-parsed discoveries tables — replaces the common workflow of grepping `a_c_bear_01` in peds_list.lua, then cross-referencing RELATIONSHIP/README.md for its relationship group. Returns: type, name, normalized hash (`0x` + 8 uppercase hex), source file + line, plus type-specific metadata (peds get `variants` + `relationship`, weapons get `group`, doors get `coords` + `model_hash`, objects get `category`/`subcategory`). Catalog ~22,500 entries (mostly objects). Typical latency p50 ~15ms, p95 ~65ms.\n\nNOT for:\n- **Script natives** like `SET_ENTITY_COORDS`, `GetPedHealth`, or hashes from `Citizen.InvokeNative(0x...)` — use `lookup_native`. Native hashes are 64-bit (`0x06843DA7060A026B`); asset hashes are 32-bit (`0xBCFD0E7F`). Different namespaces, never collide.\n- **Flag enums, settings, clipsets, scenario keys** like `CPED_CONFIG_FLAGS`, `MP_Style_Casual`, `mech_loco_m@`, `MAGGIE_SEAT_CHAIR_DESK_WRITING`. Those live as tokens in lua source but not in this catalog. Use `grep_docs`.\n- **Behavior queries** (\"which animal is the bear\", \"weapons in the lemat family\") — use `semantic_search`.\n\nPass exactly ONE of `name` / `hash` / `search`. Optional `type` narrows to a category (useful when a fragment like \"horse\" hits both peds and vehicles). Note: `type` reflects the SOURCE FILE — the same asset name can exist under multiple `type`s. e.g. `mp006_p_mshine_int_door01x` appears as `type=object` (1 row from object_list.lua) AND `type=door` (2 rows from doorhashes.lua, different door hashes for distinct in-world instances with `coords`). Pick `type=door` when you want lockable in-world doors with positions; `type=object` for the model itself.\n\nExamples:\n- `{name: \"a_c_bear_01\"}` → exact ped lookup, returns variants=11 + relationship=REL_WILD_ANIMAL_PREDATOR.\n- `{hash: \"0xBCFD0E7F\"}` → resolves to ped `a_c_bear_01` (omit `0x` ok).\n- `{search: \"lemat\", type: \"weapon\"}` → substring match → `weapon_revolver_lemat`.\n- `{search: \"moonshine\", type: \"door\"}` → exact substring misses (no door name contains \"moonshine\"), fuzzy trigram fallback fires → `mp006_p_mshine_int_door01x`. Fuzzy mainly fires when `type` narrows out the exact-substring matches; without `type`, common terms find substring hits first and never reach fuzzy.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"hash": {
"description": "Asset hash (32-bit jenkins) in HEX format, case-insensitive, `0x` prefix optional. Examples: `0xBCFD0E7F`, `bcfd0e7f`. Use when you have a hash from decompiled code or another table and need the canonical name + metadata. Decimal-formatted hashes (e.g. `1946191463`) are NOT accepted — convert to hex first (`(1946191463).toString(16)`).",
"minLength": 1,
"type": "string"
},
"limit": {
"default": 5,
"description": "Max matches to return. Default 5, max 50. Only applies to `search` — exact `name`/`hash` always return 0 or 1.",
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"name": {
"description": "Exact asset name, case-insensitive. Examples: `a_c_bear_01`, `weapon_pistol_volcanic`, `p_safe01`, `armysupplywagon`. Use when you know the precise name.",
"minLength": 1,
"type": "string"
},
"search": {
"description": "Substring fragment within asset name, case-insensitive. Examples: `lemat`, `norfolk`, `volcanic`. Use when you remember part of the name. Algorithm: exact substring (ILIKE) first; if zero hits, falls back to pg_trgm `strict_word_similarity` ≥0.4 — catches abbreviation gaps like `moonshine`↔`_mshine_` when narrowed by `type` (without `type`, common terms find substring matches first and fuzzy never fires). `matchType` in the response tells you which path hit: `search` = exact substring, `fuzzy` = trigram.",
"minLength": 2,
"type": "string"
},
"type": {
"description": "Filter results to one category. Useful when a name fragment matches multiple types (e.g. `horse` hits peds + vehicles).",
"enum": [
"ped",
"weapon",
"object",
"door",
"vehicle"
],
"type": "string"
}
},
"type": "object"
},
"name": "asset_lookup",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"assets": {
"items": {
"additionalProperties": false,
"properties": {
"hash": {
"type": "string"
},
"matchType": {
"type": "string"
},
"metadata": {
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"type": "object"
},
"name": {
"type": "string"
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceLine": {
"type": "number"
},
"sourcePath": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"type",
"name",
"hash",
"sourcePath",
"sourceLine",
"metadata",
"matchType",
"note"
],
"type": "object"
},
"type": "array"
},
"hashFormat": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"enum": [
"hit",
"suggestions",
"cross_domain",
"miss"
],
"type": "string"
},
"suggestions": {
"items": {
"additionalProperties": false,
"properties": {
"hash": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name",
"hash",
"type"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"status",
"assets",
"suggestions",
"hint",
"hashFormat"
],
"type": "object"
}
},
{
"description": "Enumerate doc paths in a category/namespace. Use to discover what exists before calling `get_document` or a targeted `grep_docs`. NOT a content search — use `semantic_search` for behavior/concept lookups or `grep_docs` for token lookups. Returns `{path, title, chunks}[]`.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"category": {
"enum": [
"natives",
"vorp",
"rsgcore",
"oxmysql",
"discoveries",
"jo_libs",
"cfx",
"guides",
"learnings"
],
"type": "string"
},
"namespace": {
"type": "string"
}
},
"type": "object"
},
"name": "browse",
"outputSchema": null
},
{
"description": "Fetch full markdown of a doc by `path` (as returned by `browse`, `semantic_search`, or `grep_docs`). Use to retrieve full content after a search snippet looks promising. Pass `heading` (full breadcrumb like `Character Management > Inventory Management`, or just the leaf — case-insensitive, fuzzy) to fetch only that section. Deep-heading matches auto-prepend the H2 parent's intro for context. For individual script natives prefer `lookup_native`. The largest rdr3_discoveries lua data tables are keyed catalogs: call with no `heading` to list their top-level keys, then pass a key as `heading` to fetch that one entry; use `grep_docs` to search values inside. For code symbols (`addItem`) use `grep_docs`. Community findings use `learning:N` paths, not `learnings/<slug>.md`. On 404 returns available headings + cross-file hints.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"heading": {
"description": "Optional prose heading from the doc, e.g. `Add Item to User` or `Character Management > Inventory Management`. Case-insensitive, fuzzy match on the leaf (text after the final `>`). NOT for code symbols — `addItem`, `getPlayerPed` etc. won't match; use `grep_docs` for those.",
"minLength": 1,
"type": "string"
},
"path": {
"description": "Doc path. Two valid shapes: (a) `<category>/<file>.md` for docs, e.g. `vorp/vorp_core_docs.md`; (b) `learning:<id>` for community findings, e.g. `learning:11`. Use the path returned by `browse`/`semantic_search`/`grep_docs` verbatim — do not invent `learnings/<slug>.md`.",
"minLength": 1,
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
},
"name": "get_document",
"outputSchema": null
},
{
"description": "Load the calling-convention reference for RedM/RDR3 natives in `js` or `lua`. Call ONCE per session before writing native-calling code — every native doc page only shows Lua examples, so JS/TS authors need this to translate correctly. Covers result modifiers (`Citizen.resultAsInteger/Float/String/Vector`), `Citizen.invokeNative` vs `invokeNativeByHash`, type mapping, pointer-arg gotchas, worked examples. Cheap, no embedding.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"language": {
"description": "Target language: 'js' or 'lua'",
"enum": [
"js",
"lua"
],
"type": "string"
}
},
"required": [
"language"
],
"type": "object"
},
"name": "get_invoke_guide",
"outputSchema": null
},
{
"description": "Find an EXACT literal token in raw doc files (markdown + lua). Use for specific weapon/ped/animation/prop/interior/zone names (`weapon_pistol_volcanic`, `a_c_bear_01`, `p_campfire01x`), known hashes (`0x020D13FF`), walkstyles/clipsets (`MP_Style_Casual`, `mech_loco_m@`), or any string you'd `grep` for. NOT for behavior/concept queries (use `semantic_search`) or script-native hash/name lookup (use `lookup_native`). REQUIRED for tokens inside the largest rdr3_discoveries data tables (audio_banks, ingameanims_list, cloth_drawable, cloth_hash_names, object_list, megadictanims, entity_extensions, imaps_with_coords, propsets_list, vehicle_bones) — only preview-indexed for embeddings, so `semantic_search` will NOT find tokens in them. Optional: `contextBefore`/`contextAfter` for ±N surrounding lines (saves a follow-up `get_document` call); `filesOnly: true` to get paths only (cheap exploration); `multiline: true` for cross-line patterns (`(?s)foo.*bar`). Pattern uses Rust regex syntax (rg engine). PREFER one targeted call over giant `a|b|c|d|e` alternations — split into separate calls; alternations rarely improve recall and bloat the regex automaton. Returns matched lines with path + line number. Long matched lines are windowed ±60 chars around the match (…); to read around a hit, use `read_lines({path, start})` for the preview-only mega-tables listed above (get_document holds only their ~80-line head), or `get_document({path})` for ordinary docs. If you are retrying after a previous pattern returned no matches, populate `prior_attempt` so the server can record what didn't work and steer alternative spellings.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"caseInsensitive": {
"description": "Default true. Set false for case-sensitive match.",
"type": "boolean"
},
"category": {
"description": "Limit to a doc category. The enum lists this server's categories (see list_namespaces).",
"enum": [
"natives",
"vorp",
"rsgcore",
"oxmysql",
"discoveries",
"jo_libs",
"cfx",
"guides",
"learnings"
],
"type": "string"
},
"contextAfter": {
"description": "Include N lines after each match (rg -A).",
"maximum": 10,
"minimum": 0,
"type": "integer"
},
"contextBefore": {
"description": "Include N lines before each match (rg -B). Saves follow-up get_document calls when you need surrounding context.",
"maximum": 10,
"minimum": 0,
"type": "integer"
},
"filesOnly": {
"description": "Return only the list of matching paths (no per-line matches). Cheap for exploration before zoom-in.",
"type": "boolean"
},
"limit": {
"default": 50,
"maximum": 200,
"minimum": 1,
"type": "integer"
},
"multiline": {
"description": "Allow `.` to match newlines and patterns to span lines (rg -U --multiline-dotall). Use for `(?s)foo.*bar` style.",
"type": "boolean"
},
"pathSubstring": {
"description": "Substring filter on relative doc path, e.g. 'weapons' or 'clothes/cloth_hash_names'.",
"type": "string"
},
"pattern": {
"description": "Rust regex pattern (ripgrep engine). Case-insensitive by default. Prefer narrow, single-token patterns over kitchen-sink alternations.",
"minLength": 1,
"type": "string"
},
"prior_attempt": {
"description": "Populate ONLY when retrying after a previous grep_docs call returned no matches. Skip on first attempts.",
"properties": {
"pattern": {
"description": "The previous pattern you tried.",
"type": "string"
},
"why_unhelpful": {
"description": "Why it didn't return what you needed (1 sentence).",
"type": "string"
}
},
"required": [
"pattern",
"why_unhelpful"
],
"type": "object"
}
},
"required": [
"pattern"
],
"type": "object"
},
"name": "grep_docs",
"outputSchema": null
},
{
"description": "Orient yourself: list available doc categories and their namespaces. Use once at session start (or when unsure) before applying a `category=` / `namespace=` filter to `browse` / `semantic_search`. NOT a content search. Categories: `natives` (PLAYER, ENTITY, VEHICLE, …), `vorp`, `rsgcore`, `oxmysql`, `discoveries` (AI, weapons, peds, animations, clothes, objects, …), `jo_libs` (menu, notification, callback, framework-bridge, …, dev_resources, redm_scripts), `cfx` (Cfx runtime/scripting API from docs.fivem.net: scripting-reference, scripting-manual, server-manual, client-manual, resources, cookbook, …), `guides`, `learnings`.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"category": {
"enum": [
"natives",
"vorp",
"rsgcore",
"oxmysql",
"discoveries",
"jo_libs",
"cfx",
"guides",
"learnings"
],
"type": "string"
}
},
"type": "object"
},
"name": "list_namespaces",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"categories": {
"items": {
"additionalProperties": false,
"properties": {
"category": {
"type": "string"
},
"namespaces": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"category",
"namespaces"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"categories"
],
"type": "object"
}
},
{
"description": "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).",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"hash": {
"description": "Native hash, e.g. 0x09C28F828EE674FA (case-insensitive, 0x optional)",
"type": "string"
},
"limit": {
"default": 10,
"maximum": 50,
"minimum": 1,
"type": "integer"
},
"name": {
"description": "Native name, e.g. CAN_PLAYER_START_MISSION. Substring match if no exact hit.",
"type": "string"
},
"namespace": {
"description": "Restrict to a namespace, e.g. PLAYER, ENTITY. Only used with `name`.",
"type": "string"
}
},
"type": "object"
},
"name": "lookup_native",
"outputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"natives": {
"items": {
"additionalProperties": {},
"properties": {
"content": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"descriptionSource": {
"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",
"descriptionSource",
"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"
}
},
{
"description": "Read an exact line range from a raw doc file by absolute line number — the windowed-read companion to `grep_docs`. When `grep_docs` returns a hit at `path:line` inside a large file, call `read_lines({ path, start, end })` to pull the surrounding block. This is the ONLY way to read around a hit in the largest rdr3_discoveries data tables (audio_banks, ingameanims_list, ptfx, soundsets, imaps_with_coords, megadictanims, etc.): their full bodies are NOT in the vector/heading index (only an ~80-line preview is), so `semantic_search` can't reach them and `get_document` resolves real section headings only — NOT synthetic `lines N-M` offsets. `start`/`end` are 1-based and inclusive; omit `end` for a 50-line window; one call returns at most 400 lines (narrow the range for more). For prose `.md` docs prefer `get_document` with a `heading`; to search values use `grep_docs`; for individual script natives use `lookup_native`.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"end": {
"description": "Last line to return (1-based, inclusive). Omit for a 50-line window from `start`. Spans over 400 lines are capped.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
},
"path": {
"description": "Doc path exactly as returned by `grep_docs` / `browse` / `semantic_search`, e.g. `discoveries/audio/audio_banks/audio_banks.lua`. Do not invent paths.",
"minLength": 1,
"type": "string"
},
"start": {
"description": "First line to return (1-based, inclusive). Use the line number from a `grep_docs` hit.",
"maximum": 9007199254740991,
"minimum": 1,
"type": "integer"
}
},
"required": [
"path",
"start"
],
"type": "object"
},
"name": "read_lines",
"outputSchema": null
},
{
"description": "Search RedM/RDR3 docs by behavior, concept, OR exact token. Use when you don't have a specific native hash/name (use `lookup_native`) and the term isn't a known asset name in a large data table (use `grep_docs`). Hybrid mode (default) handles 'how do I X' queries ('teleport player', 'spawn vehicle', 'inventory add item') AND tokens ('addItem', 'weapon_pistol_volcanic', 'CPED_CONFIG_FLAG_') — fused via RRF over vector + BM25. Returns ranked snippets (path, breadcrumb, heading, snippet, score). Call `get_document({path, heading})` for full chunk content. `mode=semantic` for pure vector; `mode=lexical` for pure BM25. Filter via `category=vorp|rsgcore|oxmysql|natives|discoveries|jo_libs|cfx|learnings` or `namespace`. `category=cfx` = Cfx runtime/scripting API (RegisterCommand, exports, events, statebags, fxmanifest, convars, OneSync, NUI) — not natives, not framework docs. Community findings merged by default; `category=learnings` returns only findings. If you are retrying after a previous call returned no useful results, populate `prior_attempt` so the server can surface alternative wordings and learn what's missing from the docs.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"category": {
"description": "Limit to one doc category",
"enum": [
"natives",
"vorp",
"rsgcore",
"oxmysql",
"discoveries",
"jo_libs",
"cfx",
"guides",
"learnings"
],
"type": "string"
},
"limit": {
"default": 20,
"description": "How many ranked snippets to return. Default 20 (Anthropic contextual-retrieval research: top-20 outperforms top-5/10 before reranking).",
"maximum": 25,
"minimum": 1,
"type": "integer"
},
"mode": {
"description": "Retrieval mode. Default hybrid (recommended).",
"enum": [
"hybrid",
"semantic",
"lexical"
],
"type": "string"
},
"namespace": {
"description": "Limit to a native namespace, e.g. PLAYER, ENTITY",
"type": "string"
},
"prior_attempt": {
"description": "Populate ONLY when retrying after a previous semantic_search call returned no useful results. Skip on first attempts.",
"properties": {
"query": {
"description": "The previous query you tried.",
"type": "string"
},
"why_unhelpful": {
"description": "Why it didn't return what you needed (1 sentence).",
"type": "string"
}
},
"required": [
"query",
"why_unhelpful"
],
"type": "object"
},
"query": {
"description": "Natural language or token query",
"minLength": 1,
"type": "string"
},
"responseFormat": {
"default": "concise",
"description": "`concise` (default): 400-char snippet per hit — cheap, browse-style. `detailed`: full chunk content — use when you need an answer in one round-trip and want to skip the `get_document` follow-up.",
"enum": [
"concise",
"detailed"
],
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
},
"name": "semantic_search",
"outputSchema": null
},
{
"description": "Share a verified finding back to the docs corpus so the next agent can find it. Use AFTER solving a non-trivial problem to record what would have saved you time: a gotcha, a working parameter combo, an undocumented constraint, a relationship between two natives that isn't obvious. Other agents will find this via `semantic_search` (findings are merged into default results; `category: 'learnings'` returns only findings).\n\nWHEN to use:\n- You burned multiple iterations on something not in the docs.\n- You discovered an undocumented quirk (param order, hash collision, framework export that isn't in `vorp`/`rsgcore`).\n- You verified that a specific combination works (e.g. native A + flag B for behavior C).\n\nWHEN NOT to use:\n- The information is already in the docs (verify with `semantic_search`/`grep_docs` first).\n- You're guessing — only contribute verified findings.\n- It's project-specific (your repo's auth flow, your DB schema). Keep it general to RedM/RDR3.\n\nKeep `title` short and searchable. `body` should explain WHY, not just WHAT — context, the trap, the fix.",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"body": {
"description": "Markdown explaining WHY: context, the trap, the fix, verified behavior.",
"maxLength": 16000,
"minLength": 50,
"type": "string"
},
"category": {
"description": "Optional doc category this relates to.",
"enum": [
"natives",
"vorp",
"rsgcore",
"oxmysql",
"discoveries",
"jo_libs",
"cfx"
],
"type": "string"
},
"source": {
"description": "Optional short identifier of the contributing agent.",
"maxLength": 80,
"type": "string"
},
"tags": {
"description": "Up to 8 lowercase tags, e.g. ['weapons', 'damage'].",
"items": {
"maxLength": 40,
"minLength": 1,
"type": "string"
},
"maxItems": 8,
"type": "array"
},
"title": {
"description": "Short, searchable summary of the finding.",
"maxLength": 200,
"minLength": 5,
"type": "string"
}
},
"required": [
"title",
"body"
],
"type": "object"
},
"name": "share_finding",
"outputSchema": null
}
]
}Verify it yourself
curl -s https://api.teppi.xyz/v1/evidence/sha256:3fe3933e82f272fbdd49a19fc15f9a1bb001cb4b8a113048d987f97ae9cb4b02 | sha256sum