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

A5/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true, which the description does not contradict. It adds substantial behavioral context: the hybrid fusion of vectors, full-text, and structured records; reranking; community findings merging by default; mode-specific retrieval semantics; and the return format (path, breadcrumb, heading, snippet, score). This goes well beyond the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Although the description is long, every sentence earns its place. It is front-loaded with purpose and examples, then logically flows through modes, sibling routing, return format, filtering, and retry guidance. No filler or redundancy—the density is justified by the tool's complexity.

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?

With 7 parameters (including a nested object), 3 enums, no output schema, and a complex retrieval behavior, the description covers everything an agent needs: return format, routing to get_document, mode semantics, category meanings, and retry guidance. It is fully self-contained for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 parameters. The description adds significant value: it explains the meaning of categories (cfx covers runtime/scripting API), the purpose of prior_attempt for retries, the difference between responseFormat modes, and gives examples. It also clarifies default limit rationale. This is far more than restating the schema.

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?

The description opens with a clear, specific verb+resource statement: 'Search RedM/RDR3 docs by behavior, concept, or token' and gives concrete examples. It explicitly names sibling tools (lookup_native, asset_lookup, discovery_lookup, grep_docs) and the conditions that select them, making it impossible to confuse this tool with alternatives.

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?

It provides explicit routing rules: when to use lookup_native, asset_lookup, discovery_lookup, and grep_docs, with specific conditions. It also explains mode selection (hybrid vs semantic vs lexical), category filtering, and the retry pattern with prior_attempt. No ambiguity about when to invoke this tool.

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