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

Search codebase

search_codebase
Read-onlyIdempotent

Searches an indexed game front-end codebase and returns relevant code and documentation excerpts with file paths and line ranges, helping locate definitions, configurations, and flow participants.

Instructions

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_codebase"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesWhat to look for
top_kNoNumber of excerpts (default 8)

Output Schema

NameRequiredDescriptionDefault
queryYes
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish read-only, closed-world, and idempotent behavior, so the description is free to add the operationally important point: results are excerpts, not an answer, and must be read and cited as path:start-end. That clarifies downstream behavior beyond the structured hints, though limits such as excerpt size or ranking behavior are left implicit.

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?

Front-loaded with purpose and return shape, then usage, then a follow-up contract. Three tight paragraphs with no redundant restatement of the name or schema.

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?

Even with an output schema available, the description summarizes the return format and tells the agent how to use results (cite path:start-end), covering everything needed for correct invocation and follow-through on a two-parameter read tool.

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 baseline is 3, but the description adds real query semantics the schema lacks: natural language in English or Chinese, identifier queries with concrete examples, and the tactic of including a known identifier to improve results. top_k gets no additional explanation, which is acceptable given its schema text.

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 the indexed game front-end codebase' — and defines what is returned ('most relevant excerpts (code and docs) with file paths and line ranges'). An agent knows exactly which capability this is without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete when-to-use cases: finding where a value is configured, where a class/function/constant is defined, or which files take part in a flow. It also advises retrying with a narrower query on bad results. No exclusions or alternatives are stated, though no siblings exist to distinguish from.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools