function_create
Creates a global COMSOL function such as analytic, interpolation, step, or ramp to define reusable expressions for model simulations.
Instructions
Create a global function (analytic, interpolation, step, ramp, ...).
Args: name: function name (used as the function tag; callable as name(t)). function_type: COMSOL function type, e.g. Analytic, Interpolation, Piecewise, Step, Ramp, GaussianPulse, Random, Wave, Rectangle. expression: analytic expression, e.g. "sin(2pif0*t)". args: argument list, e.g. "t" (default "t"). filename: data file for Interpolation / External functions. properties: any additional feature properties to set.
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": {
"name": "<name>"
},
"name": "function_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| name | Yes | ||
| model | No | ||
| filename | No | ||
| expression | No | ||
| properties | No | ||
| function_type | No | Analytic |