Skip to content

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")
ParameterTypeDefaultDescription
namestringrequiredSymbol name
section"full" | "signature" | "body""full"Which part to return
  • full — complete function including signature and body
  • signature — first line only (fast check of parameters/return type)
  • body — body only, skipping the signature
Instead ofUse
Read entire 800-line filecode_get("functionName") — returns 40 lines
Check if a function takes the right paramscode_get("fn", section="signature") — returns 1 line

80–98% fewer tokens compared to reading whole files.