Skip to content

Core Reading

Tools for reading what’s in the graph. Always prefer these over reading raw files.

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:

ValueReturns
"full" (default)Complete function including signature
"signature"First line only — fast type/param check
"body"Body only, skipping the signature

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)


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.


List all indexed files in the project.

code_files()
code_files(path="src/services", limit=20)
code_files(offset=50, limit=50) # pagination

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.


Project structure as a tree. Good for orientation in a new codebase.

code_structure()

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.


Top-level project stats: language breakdown, total symbols, graph health.

code_overview()