Stellarion
Tools

stellarion_get_curated_context

Cross-codebase context for natural language queries

Discovers and assembles context across the entire codebase for a natural language query. Unlike get_ai_context (single symbol) or get_edit_context (single location), this tool searches the whole codebase and curates cross-cutting context from multiple files.

When to Use

  • Understanding a concept that spans multiple files ("how does authentication work?")
  • Exploring a subsystem you have never seen before ("what handles database connections?")
  • Finding patterns across the codebase ("error handling in the API layer")
  • Answering architectural questions ("how are background jobs scheduled?")

Parameters

ParameterTypeRequiredDefaultDescription
querystringYes--Natural language description of the context needed, or a symbol/module name (e.g., "authentication logic", "UserService")
uristringNo--Optional file URI to anchor the search. Results from this file are prioritized.
maxTokensnumberNo8000Maximum tokens of context to return
maxSymbolsnumberNo5Maximum number of primary symbols to include

Examples

Understanding a Subsystem

Natural Language: "How does authentication work in this project?"

MCP Tool Call:

{
  "name": "stellarion_get_curated_context",
  "arguments": {
    "query": "authentication middleware and login flow"
  }
}

Returns: Source of the auth middleware function, its callers (routes that use it), its dependencies (token verification, user lookup), and architectural memories about auth design decisions.

Exploring Error Handling

Natural Language: "Show me how errors are handled in the API layer"

MCP Tool Call:

{
  "name": "stellarion_get_curated_context",
  "arguments": {
    "query": "error handling patterns in API routes",
    "maxSymbols": 8,
    "maxTokens": 12000
  }
}

Returns: Error handler middleware, custom error types, example route handlers showing error patterns, and any conventions stored in memory about error handling.

Natural Language: "What relates to this payment processing file?"

MCP Tool Call:

{
  "name": "stellarion_get_curated_context",
  "arguments": {
    "query": "payment processing and billing",
    "uri": "file:///home/dev/project/src/billing/processor.ts"
  }
}

Returns: Context anchored around the payment processor file, with related symbols from other billing modules prioritized over generic matches.

Output Format

The response is assembled through a pipeline:

  1. Symbol search -- Finds symbols matching the query using semantic and keyword search
  2. Source resolution -- Retrieves full source code for the top matching symbols
  3. Dependency walk -- Follows the dependency graph to find related modules
  4. Memory retrieval -- Fetches relevant memories (debug notes, decisions, conventions)
  5. Curation -- Prioritizes everything by relevance and fits within the token budget

Each symbol in the response includes its name, kind, file location, full source code (or signature if budget-constrained), and relationship to the query.

Tips

  • Be specific in your query. "authentication middleware" returns better results than just "auth".
  • Use uri to anchor results when you already know one relevant file. This biases the search toward related code in the same area.
  • Increase maxSymbols when exploring a large subsystem. Decrease it when you want focused results.
  • This tool is best for cross-cutting concerns. For a single function, stellarion_get_ai_context is faster and more focused.
  • Chain with stellarion_get_call_graph on specific results to trace execution flow deeper into the codebase.