pw_run_glyph
Run Glyph/Tcl code in a safe interpreter for Pointwise tasks not covered by other tools, optionally loading a project and saving results.
Instructions
Escape hatch: run Glyph/Tcl code for things the other tools do not cover. The code runs in a Tcl safe interpreter: Tcl core plus pw::/pwu:: commands and Glyph objects; no exec, open, file, socket, load, source, cd or exit, and pw::Script is blocked, so there is no shell access. Returns everything the code puts and its last result. Optionally loads project first and saves to save_as after.
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": {
"code": "<code>"
},
"name": "pw_run_glyph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Glyph (Tcl) code. | |
| backend | No | 'batch' (default): a headless tclsh run per call, state passed through .pw files. 'live': send the step to a running Pointwise GUI through its Glyph Server (port 2807). | |
| project | No | Optional .pw to load first (batch starts empty otherwise). | |
| save_as | No | Optional .pw to save to afterwards. | |
| discard_unsaved | No | Live backend only: allow replacing a GUI session with unsaved changes. | |
| timeout_seconds | No | Seconds before the Pointwise run is stopped with kind=timeout (default 1800). Counts time the computer is awake; sleep or hibernation does not count. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||