Stellarion
Tools

stellarion_memory_context

Get memories relevant to a specific file, function, or topic

Retrieves memories that are contextually relevant to a code location or query. Unlike stellarion_memory_search which searches by explicit query, this tool infers what's relevant based on the file you're working in, the function you're looking at, or a combination of both with a query.

When to Use

  • You're about to modify a file and want to know if there are any related memories (gotchas, past bugs, decisions)
  • You're reviewing a function and want to check for prior context
  • You want file-specific or function-specific memories without crafting a search query

Parameters

ParameterTypeRequiredDefaultDescription
uristringnoFile path to find relevant memories for
linenumbernoLine number to narrow context to a specific function
querystringnoAdditional query to refine relevance
limitnumberno5Maximum number of results

Examples

Get memories for a file

Natural language:

Are there any notes or memories about src/auth/jwt.ts?

MCP call:

{
  "tool": "stellarion_memory_context",
  "arguments": {
    "uri": "src/auth/jwt.ts"
  }
}

Get memories for a specific function

Natural language:

Any prior context about the function at line 42 of src/db/connection.rs?

MCP call:

{
  "tool": "stellarion_memory_context",
  "arguments": {
    "uri": "src/db/connection.rs",
    "line": 42
  }
}

Combine file context with a query

Natural language:

Any known issues with error handling in src/api/handlers.py?

MCP call:

{
  "tool": "stellarion_memory_context",
  "arguments": {
    "uri": "src/api/handlers.py",
    "query": "error handling issues"
  }
}

Output Format

Returns contextually relevant memories, ranked by relevance:

  • id — Memory ID
  • content — Memory content
  • score — Contextual relevance score
  • tags — Associated tags
  • category — Category label

Tips

  • Call this proactively before modifying complex code — past debugging notes can save hours.
  • When both uri and query are provided, the tool combines file-level context with semantic search for the best results.
  • If you only have a topic but no file, use stellarion_memory_search instead.