Stellarion
Tools

stellarion_symbol_search

Find symbols by name or natural language using hybrid BM25 + semantic search

The primary search tool for discovering code in your project. It combines keyword matching (BM25) with semantic understanding to find functions, classes, methods, and other symbols even when you don't know their exact names.

This is typically your starting point when exploring unfamiliar code.

When to Use

  • You need to find a function but only know what it does, not its name
  • You want to search by exact or partial symbol name
  • You need to narrow results by symbol type (functions only, classes only, etc.)
  • You want to scope a search to a specific directory or module

Parameters

ParameterTypeRequiredDefaultDescription
querystringyesSearch query: a symbol name, partial name, or natural language description
symbolTypeenumnoanyFilter by type: function, class, method, variable, interface, type, module, any
limitnumberno20Maximum number of results to return
scopestringnoPath filter to restrict search to a directory (e.g., src/auth)
minScorenumbernoMinimum relevance score threshold to filter low-quality matches

Examples

Natural language:

Find all functions that handle user authentication

MCP call:

{
  "tool": "stellarion_symbol_search",
  "arguments": {
    "query": "user authentication",
    "symbolType": "function"
  }
}

Search for a class by partial name

Natural language:

Find classes with "Parser" in the name

MCP call:

{
  "tool": "stellarion_symbol_search",
  "arguments": {
    "query": "Parser",
    "symbolType": "class"
  }
}

Scoped search within a directory

Natural language:

Find all interfaces in the api directory

MCP call:

{
  "tool": "stellarion_symbol_search",
  "arguments": {
    "query": "interface",
    "symbolType": "interface",
    "scope": "src/api"
  }
}

High-confidence results only

Natural language:

Find functions related to caching, only high-confidence matches

MCP call:

{
  "tool": "stellarion_symbol_search",
  "arguments": {
    "query": "cache invalidation",
    "symbolType": "function",
    "minScore": 0.7
  }
}

Output Format

Returns a ranked list of matching symbols, each including:

  • name — Symbol name
  • kind — Symbol type (function, class, method, etc.)
  • uri — File path where the symbol is defined
  • line — Line number of the definition
  • score — Relevance score (higher is better)
  • snippet — Code preview around the definition

Tips

  • Start with broad queries and refine. If you get too many results, add a symbolType filter or increase minScore.
  • Natural language queries work best when you describe behavior: "validate email format" finds more than just "email".
  • Use scope to avoid noise from test files or vendored dependencies: scope: "src".
  • Combine with stellarion_get_detailed_symbol to drill into a specific result.
  • The hybrid search means both exact name matches and semantic similarity contribute to ranking — a query for "serialize" will also find "marshal" and "encode".