Skip to main content
Glama

Hybrid search RedM docs (semantic + lexical)

semantic_search
Read-only

Search 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

TableJSON Schema
NameRequiredDescriptionDefault
modeNoRetrieval mode. Default hybrid (recommended).
limitNoHow many ranked snippets to return. Default 20 (Anthropic contextual-retrieval research: top-20 outperforms top-5/10 before reranking).
queryYesNatural language or token query
categoryNoLimit to one doc category
namespaceNoLimit to a native namespace, e.g. PLAYER, ENTITY
prior_attemptNoPopulate ONLY when retrying after a previous semantic_search call returned no useful results. Skip on first attempts.
responseFormatNo`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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "natives",
      -  "vorp",
      -  "rsgcore",
      -  "oxmysql",
      -  "discoveries",
      -  "jo_libs",
      -  "guides",
      -  "learnings"
      -]New value: +[
      +  "natives",
      +  "vorp",
      +  "rsgcore",
      +  "oxmysql",
      +  "discoveries",
      +  "jo_libs",
      +  "cfx",
      +  "guides",
      +  "learnings"
      +]
  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
    • removedInput schema / properties / prior_attempt / additionalProperties
      Removed value: -false
  3. Changed1 schema field changed
    • addedInput schema / properties / prior_attempt
      Added value: +{
      +  "additionalProperties": false,
      +  "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"
      +}
  4. 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 a safe read-only, non-destructive, non-open-world profile, and the description adds substantial behavior beyond them: hybrid mode fuses vectors, full-text and structured discoveries then reranks; results are ranked snippets; get_document opens returned paths including discovery:<id>. It also discloses what each mode retrieves and that community findings are merged by default.

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 sibling routing are front-loaded, and nearly every sentence carries operational value. It is on the dense/long side with several chained clauses, but the density is justified by the tool's complexity (7 params, three modes, many categories) rather than padding.

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 complex hybrid-search tool with 7 parameters, a nested prior_attempt object, and no output schema, the description is thorough: it explains retrieval behavior, the return shape (path, breadcrumb, heading, snippet, score), how to follow up, and the retry protocol. Nothing an agent needs to call or interpret it is missing.

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 100%, so the schema already documents all seven parameters (baseline 3). The description still adds real meaning: it defines what mode=semantic vs mode=lexical actually retrieve, expands category=cfx's scope and notes category=learnings returns only findings, and gives the precise trigger for prior_attempt. These additions go beyond the enum labels but stop short of covering every parameter nuance.

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 and resource ('Search RedM/RDR3 docs by behavior, concept, or token') with concrete query examples ('teleport player', 'spawn vehicle'). It explicitly names the sibling tools it is not (lookup_native, asset_lookup, discovery_lookup, grep_docs) and the conditions that route to each, so an agent can distinguish it without opening any 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 explicit routing rules: specific native -> lookup_native, models -> asset_lookup, animation/audio/IMAP/etc records -> discovery_lookup, raw refs -> grep_docs. It also explains mode selection, category filtering, and the retry protocol via prior_attempt, plus how to open results with get_document. This is a complete when-to-use/when-not map.

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