Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / Source
The find_symbol tool
Takes a name, an optional repository and a limit. It returns each definition with its graph.
PINNED SOURCE Copied from the repository at this commit. Source, not an execution.
PHAROS at 975a38dMIT license
find_symbol_toolbackend/app/modules/mcp/native_server.py, lines 170–187Open source
@server.tool( name="find_symbol", description="Find where a symbol (e.g. 'TokenSigner.verify') is defined, with its callers and callees.", ) def find_symbol_tool(name: str, repository: str | None = None, limit: int = 5) -> dict[str, Any]: with session_scope() as db: try: repos = resolve_repositories(db, repository) except RepositoryNotFound as exc: return _error(exc) matches = find_symbol(db, name, repository_ids=[r.id for r in repos] or None, limit=limit) return { "name": name, "matches": [ chunk_ref(c) | {"summary": c.semantic_summary, "graph": symbol_graph(db, c.id)} for c in matches ], }Where this comes from
- Commit
975a38d5d17839c26ee219295a5be6ac66b6d910- File
backend/app/modules/mcp/native_server.py- Lines
- 170–187
- Git blob
0927865cd82a674fcaaa8c119faa660d8e20a47f- License
- MIT, © 2024–2026 Pharos Contributors. Notice
Read it on GitHub at this commit
Check it yourself
From a clone of the repository, the first command prints the blob above and the second prints these lines.
git rev-parse 975a38d:backend/app/modules/mcp/native_server.py
git show 975a38d:backend/app/modules/mcp/native_server.py | sed -n '170,187p'