Skip to main content
Glama

kilo_rag_search

Run read-only semantic searches over an indexed codebase to find relevant files and code snippets without pulling the whole repository into context.

Instructions

Delegate READ-ONLY codebase search/exploration to Kilo, so you (the architect) can locate relevant code without pulling the whole repository into your own context.

This tool is a standing resource for YOUR OWN work: use it whenever you need to understand or navigate an indexed codebase — also (and especially) when you are implementing or answering questions yourself and NOT delegating anything to kilo_implement.

Runs Kilo's explore agent, which uses semantic (vector) search over the workspace's existing index plus targeted file reads, and returns a summary with file paths and code snippets. It does NOT modify files.

Note: this reuses the index maintained by the Kilo IDE extension — it does not create or refresh the index. If a workspace was never indexed by the extension, semantic search falls back to plain text/glob search.

Typical flow: call this to find the relevant files, reason about the design yourself, then hand the concrete file list to kilo_implement via focus_files.

Returns a text report: Exit Code, STDOUT (the findings), STDERR (the run trace). Review STDOUT as the reviewer.

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": "kilo_rag_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoOptional sub-directory (relative to working_directory) to restrict the search. Leave empty to search the whole workspace.
queryYesNatural-language description of what to find (concepts, behaviours, symbols). This is a semantic/vector search backed by Kilo's codebase index, so describe intent rather than exact strings.
working_directoryNoAbsolute path to the workspace root to search. MUST be the exact same absolute path Kilo indexed (the vector collection is keyed by workspace path), otherwise the search misses the index. Defaults to the server's current working directory.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it declares read-only/no-modification behavior, names the underlying `explore` agent and search mechanism (vector + targeted file reads), discloses the index-reuse limitation and the plain-text/glob fallback when a workspace was never indexed, and describes the return envelope (Exit Code / STDOUT / STDERR) and how to interpret it.

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 the verb and scope, then organized into short paragraphs covering purpose, usage, mechanism, caveats, flow, and return shape — each earning its place. It is slightly longer than necessary, and the return-format paragraph partially duplicates the existing output 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?

For a three-parameter read-only search tool with an output schema, the description covers purpose, selection, mechanism, indexing caveats, recommended workflow, and result interpretation. Nothing an agent needs in order to call it correctly is missing.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents `query`, `path`, and `working_directory` in detail, including the workspace-path keying constraint. The description adds only the general index/fallback context and does not add per-parameter meaning beyond what the schema states, so the baseline of 3 is appropriate.

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 ("README-ONLY ... search/exploration ... semantic (vector) search over the workspace's existing index") and explicitly separates itself from the sibling kilo_implement by telling the agent it is a self-service tool for its own work. An agent can pick this over kilo_implement without opening either schema.

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?

Gives explicit when-to-use guidance ("use it whenever you need to understand or navigate an indexed codebase — also (and especially) when you are implementing ... and NOT delegating"), plus a concrete typical flow that names the handoff parameter (focus_files) for kilo_implement. Alternatives and the condition that selects them are spelled out.

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