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
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| query | Yes | ||
| top_k | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |