The primary tool for understanding code. Given a file and line, it gathers the source code, related symbols, imports, sibling functions, and architecture context -- all shaped by what you intend to do with it.
Prefer stellarion_get_edit_context instead when you are about to write or modify code, as it adds callers, tests, and git history that this tool omits.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| uri | string | Yes | -- | File URI (e.g., file:///path/to/file.ts) |
| line | number | Yes | -- | Line number of the symbol (0-indexed) |
| intent | enum | No | explain | One of: explain, modify, debug, test. Controls which related code is prioritized. |
| maxTokens | number | No | 4000 | Maximum tokens of context to return. High-priority sections get full source; remaining budget fills with signatures. |
Natural Language:
"What does the processPayment function do?"
MCP Tool Call:
{
"name": "stellarion_get_ai_context",
"arguments": {
"uri": "file:///home/dev/project/src/billing/payment.ts",
"line": 42,
"intent": "explain"
}
}
Returns: Full source of processPayment, signatures of its dependencies (e.g., validateCard, chargeStripe), file imports, sibling functions in the same file, and module architecture info.
Natural Language: "There's a bug in the retry logic around line 150 of connection.py"
MCP Tool Call:
{
"name": "stellarion_get_ai_context",
"arguments": {
"uri": "file:///home/dev/project/src/network/connection.py",
"line": 150,
"intent": "debug",
"maxTokens": 6000
}
}
Returns: Full source, call chain leading to this function, debug hints (complexity score, branches, exception handlers, early returns), and related symbols prioritized for debugging.
Natural Language:
"I need to write tests for the UserService.authenticate method"
MCP Tool Call:
{
"name": "stellarion_get_ai_context",
"arguments": {
"uri": "file:///home/dev/project/src/services/user_service.ts",
"line": 88,
"intent": "test"
}
}
Returns: Full source of authenticate, existing test examples, mockable dependencies (database client, token generator), and the function's signature with parameter types.
The response contains these sections, populated based on intent and token budget:
intent: "explain" when you first encounter unfamiliar code. It prioritizes dependencies, callers, and sibling context.intent: "modify" before making changes -- it shifts priority toward tests and callers so you know what will be affected.maxTokens for complex functions with many dependencies. Decrease it when you only need a quick overview.stellarion_get_curated_context instead -- it searches the entire codebase rather than starting from a single location.