zebraindex

MCP Tools

zebraindex exposes six tools over the MCP stdio protocol. The project parameter auto-resolves to the most recently indexed project if omitted — you rarely need to specify it.


searchQuery

Search by conceptual intent using natural language. Best for: “what handles retry logic”, “where is fee calculation done”, “find session validation code”.

ParameterTypeDefaultDescription
textstringrequiredNatural language query
projectstring?autoProject name, index number, or root path
limitint?5Maximum results
languagesstring[]?allFilter by language, e.g. ["rust","ts"]
pathGlobstring?File glob, e.g. "src/**/*.rs"
includeTestsbool?falseInclude test files
{
  "tool": "searchQuery",
  "text": "retry logic with exponential backoff",
  "languages": ["rust"],
  "limit": 8
}

searchPassage

Find code similar to a snippet or error trace. Use when you have a concrete example and want to find analogous patterns elsewhere.

ParameterTypeDefaultDescription
textstringrequiredCode snippet or error message
projectstring?autoProject
limitint?5Max results
languagesstring[]?allLanguage filter
pathGlobstring?File glob
includeTestsbool?falseInclude tests
{
  "tool": "searchPassage",
  "text": "fn embed_query_async(&self, text: &str) -> anyhow::Result<Vec<f32>>"
}

searchDep

Exact symbol lookup with call-graph context. Use when you know the function or struct name. Returns the symbol body plus its callers/callees up to the requested depth.

ParameterTypeDefaultDescription
namestringrequiredExact symbol name (function, struct, type, etc.)
projectstring?autoProject
depthint?2Call graph depth
maxTokensint?Token budget cap
{
  "tool": "searchDep",
  "name": "search_exhaustive",
  "depth": 3
}

fileTree

Returns the project file tree, optionally filtered by a glob pattern.

ParameterTypeDefaultDescription
projectstring?autoProject
pathGlobstring?Filter, e.g. "**/*.rs"
{ "tool": "fileTree", "pathGlob": "crates/zti-pipeline/**" }

projectList

Lists all indexed projects with their root path, file count, and chunk count. No parameters required.

{ "tool": "projectList" }

doctor

Runs diagnostics: hardware detection, model load status, index health, IPC socket reachability. Useful when debugging why search results are missing or slow.

ParameterTypeDefaultDescription
projectstring?Optional: check a specific project’s index
{ "tool": "doctor" }

Search modes

searchQuery and searchPassage use different embedding prefixes internally:

For models without prefix routing (BGE, GTE, MiniLM) both modes produce identical embeddings.