colab_notebook_to_script
Convert a Colab notebook into a .py script: markdown becomes comments, and ! or % lines are commented out. Set out_path to write the file; otherwise get the text.
Instructions
Convert a notebook to a .py script (markdown becomes comments; lines starting with ! or % are commented out). With out_path, writes the file; otherwise returns the text. Handy before colab_run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "colab_notebook_to_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| out_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |