IMPORTANT: You MUST call this tool to generate any file.
Do NOT write code as text. Do NOT tell the user to run code themselves.
ALWAYS pass the code to THIS tool and return the download_url to the user.
Execute Python code in an isolated Jupyter kernel and return
output text + any generated files as base64 and download URLs.
YOU MUST USE THIS TOOL when user asks for:
- PPT / presentation / slides / deck → use python-pptx, call this tool
- PDF / document / report → use reportlab, call this tool
- Chart / graph / plot / visualization → use matplotlib, call this tool
- Excel / spreadsheet → use openpyxl, call this tool
- Word document → use python-docx, call this tool
- ANY file generation task → call this tool
WORKFLOW — follow exactly:
1. Write the complete Python code
2. Call THIS tool with that code
3. Get back download_url from the result files list
4. Show download_url to user as a clickable link
NEVER skip step 2. NEVER output code as text to the user.
Pre-installed packages (no pip install needed):
python-pptx → PowerPoint presentations
reportlab → PDF creation
matplotlib → charts and graphs
pandas → data analysis
numpy → numerical computing
python-docx → Word documents
openpyxl → Excel files
plotly → interactive charts
seaborn → statistical charts
Pillow → image processing
pypdf → read/merge/split PDFs
pdfplumber → extract text and tables from PDFs
File saving rules — MUST follow:
Save ALL files to current directory — NO path prefix
prs.save("presentation.pptx") ← PowerPoint
plt.savefig("chart.png", dpi=150) ← matplotlib chart
df.to_excel("report.xlsx") ← Excel
Always print() the filename after saving
Connector