GrepAI Trace Callees
This skill covers using grepai trace callees to find all functions called by a specific function.
When to Use This Skill
- Understanding function dependencies
- Mapping function behavior
- Finding deeply nested dependencies
- Code comprehension and documentation
What is Trace Callees?
grepai trace callees answers: "What does this function call?"
Basic Usage
Example
Output:
JSON Output
Output:
Compact JSON (AI Optimized)
Output:
TOON Output (v0.26.0+)
TOON format offers ~50% fewer tokens than JSON:
Note:
--jsonand--toonare mutually exclusive.
Extraction Modes
Fast Mode (Default)
Precise Mode
Use Cases
Understanding Function Behavior
Finding Dependencies
Code Review
Documentation
Callers vs Callees
Filtering Results
By File Type
Exclude Test Functions
Count by Category
What Callees Includes
The trace finds:
- Direct function calls
- Method calls
- Built-in function calls (depending on mode)
Example
Callees found:
validateOrderValidate(method)Log(from utils)Println(depending on mode)
Limitations
What Callees Might Miss
- Dynamic/runtime calls
- Callbacks and closures
- Interface method calls (may show interface, not implementation)
- Reflection-based calls
Example of Undetected Call
Combining with Trace Graph
For recursive dependency analysis, use trace graph:
Scripting Examples
List All Callees
Check for Specific Callee
Generate Dependency Report
Common Issues
❌ Problem: Function not found ✅ Solution: Check spelling and ensure function exists in indexed files
❌ Problem: No callees found (but function has calls) ✅ Solutions:
- Try
--mode precise - Check language is in
enabled_languages - Ensure symbols.gob is up to date (
grepai watch)
❌ Problem: Missing some callees
✅ Solution: Use --mode precise for better accuracy
Best Practices
- Use for understanding: Great for learning new codebases
- Combine with callers: Full dependency picture
- Use graph for deep analysis: When you need recursion
- Filter results: Focus on relevant callees
- Document findings: Export to markdown for docs
Output Format
Trace callees result:


