Skip to main content
Glama
codebase-rag-mcp
by alelcold

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CODEBASE_RAG_URLNolocal-codebase-rag 後端位址 (local-codebase-rag backend address).http://localhost:8000
CODEBASE_RAG_TOP_KNo模型沒指定時的片段數 (number of excerpts returned when the model does not specify top_k).8
CODEBASE_RAG_TIMEOUTNo等待 /search 的秒數 (seconds to wait for /search; only embedding, so no long LLM timeout needed).30
CODEBASE_RAG_MAX_CHARSNo每個片段最多保留的字元數,控制 tool 結果佔用的 context (max characters kept per excerpt, controlling context usage of the tool result).4000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Searches a game front-end codebase (TypeScript / JavaScript / Markdown) indexed by local-codebase-rag. Use search_codebase before answering questions about where something is defined, configured or handled. Cite results as path:start-end. If nothing relevant comes back, say so instead of guessing.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_codebaseA

Search the indexed game front-end codebase and return the most relevant excerpts (code and docs) with file paths and line ranges.

Use it to find where a value is configured, where a class / function / constant is defined, or which files take part in a flow. Queries can be natural language (English or Chinese) or identifiers (e.g. INVINCIBLE_MS, ScoreSystem); including an identifier when you know it improves results. Call it again with a narrower query if the first results are off target.

Returns excerpts only, not an answer: read them, then answer and cite path:start-end.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

There is only one tool, so there is no possibility of misselection between competing tools. Its purpose (semantic/identifier search over an indexed codebase returning excerpts) is stated unambiguously, including when to re-query.

Naming Consistency5/5

The single name `search_codebase` follows a clear verb_noun snake_case convention. With only one tool there is no cross-tool inconsistency to penalize.

Tool Count4/5

This is a focused RAG retrieval server, so a single search entry point is a defensible, well-scoped surface rather than a mismatch. It is on the thin side — one tool must serve every retrieval need — but nothing is redundant.

Completeness3/5

Search-and-return-excerpts is covered well, but the surface has notable gaps for a codebase-navigation domain: no way to read a full file by path, list indexed files, or check index freshness/scope. Agents hitting an off-target query have only the re-query loop to fall back on.