Hybrid search RedM docs (semantic + lexical)
semantic_searchSearch RedM/RDR3 docs by behavior, concept, or token: 'teleport player', 'spawn vehicle', 'inventory add item'. Hybrid mode (default) fuses document vectors, PostgreSQL full-text results and structured discoveries records, then reranks. For a specific native use lookup_native; for ped/weapon/object/door/vehicle models use asset_lookup; for animation/audio/IMAP/clothing/wearable/particle/flag/texture records use discovery_lookup. Use grep_docs for raw references or unsupported source formats. Returns ranked snippets (path, breadcrumb, heading, snippet, score); get_document opens returned paths, including discovery: records. mode=semantic searches document vectors only; mode=lexical uses lexical retrieval including structured discoveries. Filter via category=vorp|rsgcore|oxmysql|natives|discoveries|jo_libs|cfx|learnings or namespace. category=cfx covers the Cfx runtime/scripting API (RegisterCommand, exports, events, statebags, fxmanifest, convars, OneSync, NUI). Community findings are merged by default; category=learnings returns only findings. If retrying after an unhelpful result, populate prior_attempt with the previous query and why it missed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Retrieval mode. Default hybrid (recommended). | |
| limit | No | How many ranked snippets to return. Default 20 (Anthropic contextual-retrieval research: top-20 outperforms top-5/10 before reranking). | |
| query | Yes | Natural language or token query | |
| category | No | Limit to one doc category | |
| namespace | No | Limit to a native namespace, e.g. PLAYER, ENTITY | |
| prior_attempt | No | Populate ONLY when retrying after a previous semantic_search call returned no useful results. Skip on first attempts. | |
| responseFormat | No | `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. | concise |