tree_find
Search a COMSOL model tree for nodes by regex pattern on label or tag, optionally within a subtree and depth limit, to locate specific model components.
Instructions
Search the model tree for nodes whose label or tag matches a regex.
Args: pattern: regular expression, e.g. "temp|T0" or "^ht". root: subtree to search from ("" = whole model). max_depth: recursion depth limit.
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": {
"pattern": "<pattern>"
},
"name": "tree_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | ||
| model | No | ||
| pattern | Yes | ||
| max_depth | No |