code_interpreter
Overview
code_interpreter executes arbitrary Python code and returns stdout / stderr plus generated artifacts.
It is the main tool for data analysis, calculations, dataframe operations, and chart generation.
Parameters
{
"code": "python code string"
}
What it does
- runs Python code in a subprocess
- provides common analysis packages such as
pandasandnumpy - captures text output and generated images
- keeps generated image references available for later HTML rendering
When to use it
- CSV / Excel / dataframe analysis
- metrics computation
- chart generation
- Python-based preprocessing and transformation