ms_gui_create_current
Create or replace the current GUI document from a MaterialsScript body, reusing the existing document to prevent duplicate .xsd files.
Instructions
Create or replace the current GUI document from a MaterialsScript body. Before using this for a new structure, first try ms_gui_find_cif_import_current against open CIF sources; use manual construction only when no reliable open CIF is found or the user provides credentials/API access for a restricted source. By default it reuses the existing current/same-name document and rebuilds it in place to avoid duplicate .xsd files.
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": {
"documentName": "<documentName>",
"body": "<body>"
},
"name": "ms_gui_create_current"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | MaterialsScript body. A variable named $doc is already created. | |
| forceNew | No | Create a new GUI document even if a current or same-name document exists. Use only when the user explicitly asks for a separate new document. | |
| exportFile | No | ||
| ballAndStick | No | ||
| documentName | Yes |