Core Reading
Tools for reading what’s in the graph. Always prefer these over reading raw files.
code_get
Section titled “code_get”Read a specific function, class, or method. The most-used tool.
code_get(name="UserService")code_get(name="processPayment", section="signature")code_get(name="AuthGuard", section="body")section param:
| Value | Returns |
|---|---|
"full" (default) | Complete function including signature |
"signature" | First line only — fast type/param check |
"body" | Body only, skipping the signature |
code_grep
Section titled “code_grep”Search file contents by regex. Fast, no LLM.
code_grep(pattern="stripe\.charges\.create")code_grep(pattern="process\.env\.[A-Z_]+", max_results=10)code_grep(pattern="TODO")Params: pattern (regex), max_results (default 20)
code_search
Section titled “code_search”Find symbols by name or natural language.
code_search(query="payment processing function")code_search(query="UserService")code_search(query="the middleware that validates JWT tokens")Use code_grep for exact strings. Use code_search for concepts or symbol names.
code_files
Section titled “code_files”List all indexed files in the project.
code_files()code_files(path="src/services", limit=20)code_files(offset=50, limit=50) # paginationcode_toc
Section titled “code_toc”Table of contents — files plus their symbols.
code_toc()code_toc(path="src/controllers", limit=30)Returns a structured outline: file → functions/classes inside it.
code_structure
Section titled “code_structure”Project structure as a tree. Good for orientation in a new codebase.
code_structure()code_signature
Section titled “code_signature”Read just the signature of a symbol — one line, instant.
code_signature(name="processPayment")→ async processPayment(orderId: string, amount: number): Promise<PaymentResult>Faster than code_get(section="signature") for quick type checks.
code_overview
Section titled “code_overview”Top-level project stats: language breakdown, total symbols, graph health.
code_overview()