mat_import_xml
Import materials from a COMSOL material XML file into a model, with optional filtering by material tags, component, and model name.
Instructions
Import materials from a COMSOL material XML file (.xml) into the model.
The XML file may contain one or more <material> definitions in
COMSOL's Model XML format (the same format as comsol_optical_lib.xml).
When tags is omitted every material tag found in the file is imported.
Args: path: absolute path to the material XML file. tags: material tags inside the XML file to import (None = all). component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model).
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": {
"path": "<path>"
},
"name": "mat_import_xml"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| tags | No | ||
| model | No | ||
| component | No | comp1 |