run_python_code
Execute Python code in a specified environment, save results, and manage workflows. Ideal for code testing, development, and automation tasks.
Instructions
Execute Python code and return the result. Code runs in the working directory.
Args:
code: Python code to execute
environment: Name of the Python environment to use (default if custom path provided, otherwise system)
save_as: Optional filename to save the code before execution (useful for future reference)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | ||
environment | No | default | |
save_as | No |
Input Schema (JSON Schema)
{
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"environment": {
"default": "default",
"title": "Environment",
"type": "string"
},
"save_as": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Save As"
}
},
"required": [
"code"
],
"title": "run_python_codeArguments",
"type": "object"
}