Run Script
run_scriptRuns a Python 2 script inside headless HEXPRESS batch mode with the HXP API preloaded, returning captured stdout, process log tail, and script return values.
Instructions
Run a Python 2 script inside headless HEXPRESS (-batch -script).
The script executes with the embedded HXP API preloaded (HXP.open_project,
HXP.generate_initial_mesh, HXP.insert_viscous_layers, ... — see
_python/_igg/HXP.py in the install), wrapped so that its stdout (which
HEXPRESS batch mode otherwise swallows) is captured, and a
SCRIPT_RETURN_VALUE line — printed as print "SCRIPT_RETURN_VALUE", 0 —
or 0/1 on success/exception is read back from a result file.
Provide exactly one of script_text (written to a temp file) or script_file.
Returns returncode, script_return_value, captured script stdout and the
process log tail.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | ||
| install_dir | No | ||
| script_file | No | ||
| script_text | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |