Tools at a Glance
| Tool | When to Use | Cost |
|---|---|---|
list_images | Before importing anything | Free |
import_image | Need new base image | VM |
rsync | Local files needed in container | Free |
run | Execute code | VM |
upload | Single file to container | Free |
download | Extract file from container | Free |
get_image | Check if image exists | Free |
set_tag | Name frequently-used images | Free |
list_files | Explore container filesystem | Free |
read_file | Read file from container | Free |
get_operation | Poll async operation | Free |
list_operations | Find running operations | Free |
wait_operations | Wait for multiple ops | Free |
cancel_operation | Stop stuck operation | Free |
get_guide | Get documentation sections | Free |
Common Workflows
Run Python Code
Install Dependencies
Parallel Execution
Rollback
Inspect Container (No VM)
Decision Quick Guide
| Situation | Action |
|---|---|
| First time using an image | list_images first |
| Running existing code | rsync + run |
| Installing packages | run with disposable=false |
| Multiple independent tasks | Use wait=false + wait_operations |
| Long-running command | Increase timeout |
| Large output expected | Increase truncate_output_at |
| Need to save state | disposable=false |
| One-off experiment | disposable=true (default) |
Parameters Quick Reference
run
rsync
import_image
Key Rules
- Check before importing —
list_imagesfirst - Reuse directory_state_id — Valid for entire session
- Use UUIDs directly — Only tag frequently-used images
- One step per command — Easier rollback and debugging
- Always exclude —
__pycache__,.git,.venv,node_modules
Error Recovery
| Error | Solution |
|---|---|
| Image not found | list_images to find correct UUID |
| Directory state not found | Re-run rsync |
| Command timed out | Increase timeout parameter |
| Output truncated | Increase truncate_output_at |
| Operation stuck | cancel_operation + retry |
Resources (Read-Only)
| URI Pattern | Returns |
|---|---|
contree://image/{uuid}/read/{path} | File contents |
contree://image/{uuid}/ls/{path} | Directory listing |
contree://image/{uuid}/lineage | Parent-child history |
contree://guide/{section} | Documentation |
contree://operations/instance/{id} | Command execution result |
contree://operations/import/{id} | Image import result |