code_get
code_get reads a named symbol from the indexed graph. Always prefer this over reading entire files — it returns exactly what’s needed with zero noise.
code_get(name="UserService")code_get(name="processPayment", section="signature")Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | required | Symbol name |
section | "full" | "signature" | "body" | "full" | Which part to return |
Sections
Section titled “Sections”full— complete function including signature and bodysignature— first line only (fast check of parameters/return type)body— body only, skipping the signature
Token savings
Section titled “Token savings”| Instead of | Use |
|---|---|
| Read entire 800-line file | code_get("functionName") — returns 40 lines |
| Check if a function takes the right params | code_get("fn", section="signature") — returns 1 line |
80–98% fewer tokens compared to reading whole files.