execute_temporary_code
Run temporary code blocks for debugging, magic commands, and intermediate variable inspection without saving to the notebook.
Instructions
Execute a temporary code block (not saved to the Notebook) and will return the output.
It will recommend to use in following cases:
Execute Jupyter magic commands(e.g.,
%timeit,%pip install xxx)Debug code
View intermediate variable values(e.g.,
print(xxx),df.head())Perform temporary statistical calculations(e.g.,
np.mean(df['xxx']))
DO NOT USE IN THE FOLLOWING CASES:
Import new modules and perform variable assignments that affect subsequent Notebook execution
Run code that requires a long time to 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": {
"notebook_name": "<notebook_name>",
"cell_content": "<cell_content>"
},
"name": "execute_temporary_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell_content | Yes | ||
| notebook_name | Yes |