Skip to main content
Glama
grandMA2 MCP
by drohi-r

search_codebase

Search source code, grandMA2 documentation, and MCP SDK content through a RAG index to find relevant implementation details, command examples, and API references.

Instructions

Search source code, grandMA2 docs, and MCP SDK source using the RAG index.

Three indexed knowledge sources (repo_refs):
- "worktree"     — this server's Python source, tests, and docs
- "ma2-help-docs" — ~1,043 grandMA2 help pages from help.malighting.com
- "mcp-sdk"      — installed MCP SDK source (~110 files, types, server, tools)

Works without any API key (text-search fallback). With GITHUB_MODELS_TOKEN
set, results are ranked by semantic similarity.

Args:
    query:  Natural language or keyword query (e.g. "navigate console",
            "store preset", "how to patch fixtures", "mcp tool context")
    top_k:  Number of results to return (default 8, max 20)
    kind:   Optional filter — one of: "source", "test", "doc", "config"

Returns:
    JSON array of matching chunks with path, kind, lines, score, and text.
    Returns an error JSON if the RAG index has not been built yet.

Examples:
    - Find command builders:   query="store preset", kind="source"
    - Find grandMA2 docs:      query="how to patch fixtures", kind="doc"
    - Find MCP SDK internals:  query="mcp tool decorator context"
    - Search everything:       query="effects engine"
    - Find test examples:      query="navigate_console", kind="test"

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
kindNo
queryYes
top_kNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the no-API-key text-search fallback, the semantic re-ranking that activates only when GITHUB_MODELS_TOKEN is set, and the failure mode (error JSON when the index has not been built). It does not state result freshness or index-build instructions, which keeps it short of a 5.

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?

Front-loaded with purpose, then source list, behavior, args, returns, examples — a clean hierarchy with no filler sentences. It runs long, and five examples plus the full arg/return recital is more than strictly necessary, which is why it is not a 5.

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?

An output schema exists, so return-value detail is optional, yet the description still summarizes the chunk fields and the error case. Combined with auth behavior and full parameter semantics, nothing an agent needs to invoke it correctly is missing.

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 0% and the schema's kind field has no enum at all, yet the description supplies the complete enum (source/test/doc/config), the top_k default and max of 20, and natural-language examples for query. This is a case where the description fully compensates for an undocumented 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 first sentence names a specific verb (search) plus the three concrete resources it indexes (source code, grandMA2 docs, MCP SDK source) and the mechanism (RAG index). That is enough to distinguish it from the console-control siblings like navigate_console or apply_preset, which mutate a show rather than read a knowledge base.

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?

The Examples block effectively maps intent to parameters ("store preset" + kind="source", "how to patch fixtures" + kind="doc"), and the 'Search everything' example shows the unfiltered path. There is no explicit statement of when NOT to use it or of a competing tool, but the source enumeration already makes the boundary with the console tools clear.

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