💻 Code Tools Reference
These tools are designed to help the AI understand the structure of your code and assist with higher-level development tasks.
These tools are designed to help the AI understand the structure of your code and assist with higher-level development tasks.
🏗️ Structure Analysis
view_file_outline
Provides a high-level summary of a file's structure.
- Capabilities: Detects classes, functions, and their line ranges.
- UI: Returns a clean table of definitions.
- Usage:
What are the main functions in assistant.py?
view_code_item
Extracts the full definition of specific code elements (classes or functions).
- Parameters:
Filepath and a list ofNodePaths(e.g.,MyClass.my_method). - Usage:
Show me the implementation of the login method in AuthService.
🛡️ Verification & Quality
linter_tool
Runs static analysis on your code to find potential issues.
- Supported:
pylint,flake8,mypy. - Usage:
Check src/utils.py for any lint errors.
test_generation_tool
Automatically suggests and creates unit tests for a given file.
- Usage:
Generate pytest unit tests for the math_lib module. - Action: Analyzes functions and edge cases to build comprehensive test suites.
⚙️ Logic Execution
execute_python
Runs a Python script and captures its output.
- Parameters:
Codeto run,Args, and theEnvironment(Local, Docker, or E2B). - Usage:
Run the main.py script with the --verbose flag.
run_terminal_command
Executes a generic shell command.
- Safety: Requires user confirmation in most modes.
- Usage:
Install the pandas library using pip.
💡 AI Strategy
When the AI is asked to "fix a bug," it typically follows this pattern:
view_file_outlineto find the relevant code.view_code_itemto understand the logic.execute_python(in sandbox) to reproduce the error.replace_file_contentto apply the fix.linter_toolandexecute_pythonto verify the solution.