get_file_context
Retrieve file-specific knowledge base context: architecture decisions, bugfix summaries, and best practices ranked by relevance. Use before editing any source file.
Instructions
Retrieve knowledge base context relevant to a specific source file. Read-only.
Runs multiple semantic searches derived from the filename and returns
architecture decisions, past bugfixes, and best practices related to
that file — without requiring a manual search query. No files modified.
Complements get_recent_sessions() (temporal context) with file-level
spatial context. Use before reading or editing any source file.
Use search_docs() for free-form queries not tied to a specific file.
Args:
filename: File path or name being opened/edited, e.g.
"payment.service.ts" or "src/auth/jwt.py"
project: Target project name (optional)
Returns:
Relevant architecture docs, bugfix summaries, and best practices
for the given file, ranked by relevance. Returns "no context found"
when the knowledge base has nothing for that file yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| project | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |