COMSOL Multiphysics MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COMSOL_MCP_CORES | No | Number of solver cores. Default is 0, meaning all available cores. | |
| COMSOL_MCP_CONFIG | No | Path to a JSON settings file. Default is empty. | |
| COMSOL_MCP_FFMPEG | No | Path to ffmpeg for MP4 animation. Auto-detected by default. | |
| COMSOL_MCP_VERSION | No | COMSOL version to use, for example 6.4. Defaults to the latest installed version. | |
| COMSOL_MCP_WORKDIR | No | Workspace root directory. Default is <cwd>\comsol_workspace. | |
| COMSOL_MCP_DOC_ROOT | No | Root directory of offline COMSOL HTML documentation used by docs_search(scope="help"). Auto-detected by default. | |
| COMSOL_MCP_LOG_FILE | No | Log file path. Default is <workdir>\logs\... | |
| COMSOL_MCP_AUTOSTART | No | Whether to automatically start COMSOL on the first COMSOL tool call. Default is 1. | |
| COMSOL_MCP_LOG_LEVEL | No | Log level. Default is INFO. | |
| COMSOL_MCP_TOOL_DENY | No | Comma-separated denylist of tool names or prefixes, for example java_eval. Default is empty. | |
| COMSOL_MCP_ALLOW_EVAL | No | Set to 0 or false to disable the java_eval tool. Default is 1. | |
| COMSOL_MCP_KEEP_ALIVE | No | Whether to keep COMSOL running after the MCP server exits. Default is 1. | |
| COMSOL_MCP_MODEL_ROOT | No | Saved model directory. Defaults to a subdirectory of the workspace. | |
| COMSOL_MCP_TOOL_ALLOW | No | Comma-separated allowlist of tool names or prefixes. Default is empty. | |
| COMSOL_MCP_COMSOL_ROOT | No | COMSOL installation root directory, for example C:\Program Files\COMSOL\COMSOL64. Auto-detected by default. | |
| COMSOL_MCP_SERVER_PORT | No | COMSOL server port. Default is 0, meaning a random port. | |
| COMSOL_MCP_CONNECT_HOST | No | Host to connect to. Default is localhost. | |
| COMSOL_MCP_SESSION_MODE | No | Session mode: client-server or stand-alone. Default is client-server. | |
| COMSOL_MCP_TOOL_PROFILE | No | Tool exposure profile: full (all 274 tools), minimal (166 core tools), or custom. Default is full. | |
| COMSOL_MCP_ARTIFACT_ROOT | No | Artifact output directory. Defaults to a subdirectory of the workspace. | |
| COMSOL_MCP_SOLVE_TIMEOUT | No | Timeout for synchronous solves in seconds. Default is 0, meaning no timeout. | |
| COMSOL_MCP_START_TIMEOUT | No | Number of seconds to wait for COMSOL startup. Default is 180. | |
| COMSOL_MCP_MAX_OUTPUT_ITEMS | No | Maximum number of items returned in lists. Default is 400. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
COMSOL Multiphysics MCP (273 tools, COMSOL 6.x)
This server drives the locally installed COMSOL Multiphysics through its Java client API: full model building (geometry, materials, physics, multiphysics, mesh), solving (all study types), results evaluation, plotting, simulation animations (GIF/MP4), data/file/report export, plus the official COMSOL example model library (2,081 models) and a curated knowledge base.
Typical workflow
session_start(once per session;session_statusto check) thenmodel_create(dimension=3)(2 for 2D, 1 for 1D).parameter_set(...)early; build geometry withgeom_primitive,geom_boolean,geom_transform,geom_extrude,geom_build. Find entity numbers for boundary conditions withgeom_entity_info(entity_dim: 3=domains, 2=boundaries, 1=edges) andgeom_selection_actions.Materials:
mat_library_search->mat_add, ormat_createfor manual properties; assign withmat_assign.Physics:
phys_add(type="HeatTransfer"), thenphys_add_bc(friendly aliases such as temperature/heat_flux/inlet/outlet/fixed/ground) orphys_add_feature+phys_set_property/phys_set_selection. Couplings:multiphysics_add.Mesh:
mesh_create_sequence->mesh_auto_size/mesh_set_size->mesh_build->mesh_stats.Study:
study_stationary/study_transient/study_eigenfrequency/study_frequency/study_parametric(create + solve), or fine-grainedstudy_create+study_add_step+study_solve. Long solves:study_solve_asyncthenjob_status/study_solve_wait.Results:
result_eval_point,result_integrate,result_average,result_minmax,result_eval_global,result_export_data,result_eval_all_solutions; datasets viadataset_create.Visuals:
plot_quick(expr="T")for a one-call rendered PNG;plot_group_create+plot_add_feature+plot_export_imagefor full control;visual_view_imageshows an exported image inline.Animation (flagship):
anim_quick(expr="T", formats=["gif","mp4"])oranim_create(plotgroup=...); native COMSOL animation viaanim_export;visual_view_animationshows sampled frames inline.Export/report:
export_model_file,export_model_java,export_mesh,export_geometry,report_create+report_add_section+report_generate(HTML/DOCX). Save withmodel_save.
Rules of thumb
Always check
session_status; callsession_startif disconnected. One COMSOL server accepts one client only — never share a COMSOL server between MCP clients.Discover valid type strings with
catalog_*tools (932 physics interfaces, 7,343 physics features, 97 geometry features, 51 mesh features, 81 study steps):catalog_physics_interfaces,catalog_physics_features,catalog_geometry_features,catalog_mesh_features,catalog_study_features,catalog_types.Unsure about a node's property names?
tree_properties/tree_infofirst, thentree_set_property;tree_childrenbrowses anything in the model tree.Need domain guidance?
docs_workflow(goal=...),docs_get(name=...),docs_search(query=...); need a real example project?library_search->library_describe->library_load/library_run.Entity dimensions: 3=domains, 2=boundaries/faces, 1=edges, 0=points (3D); in 2D: 2=domains, 1=boundaries, 0=points.
Expressions carry units: "400[K]", "1e4[W/m^2]", "0.1[m]".
Every export returns an absolute path under the workspace artifact_root.
Ultimate escape hatch:
java_eval(code=...)executes Python against the live Java API objects (model, jm, client, jcast/jset/jget, tree).
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| anim_exportA | Export a COMSOL-native animation of a plot group (movie or image sequence). Creates Args: plotgroup: plot group tag to animate, e.g. "pg1" (see anim_list / plot_list). format: movie container: "gif" (no external deps, default), "avi" or "webm". output: output path. Movie: e.g. "C:/out/heat.gif". For kind="imageseq" pass the frame base path, e.g. "C:/out/frame" -> frame1.png, frame2.png, ... Omit to auto-generate under the artifact workspace. kind: "movie" (default) or "imageseq" (numbered PNG frames). fps: frames per second for movies (positive int, default 10). maxframes: number of frames (>= 2, default 25). Fewer stored solutions produce fewer frames; COMSOL samples the available range evenly. width: frame width in px (default 640, used when size="manual"). height: frame height in px (default 480). size: "manual" (default) | "current" | "hd". sweeptype: "solutions" (default) | "parameter" | "globalparameter" | "dde" | "streamline". solnumtype: parametric sweep selection: "all" (default) | "level1" | "level2" | "level3" | "inner" | "outer". solnum: explicit 1-based solution numbers to animate, e.g. [1,3,5]. looplevel: explicit loop-level solution indices, e.g. [1,2,3,4]. framesel: "all" | "number" (COMSOL default "number" = use maxframes). background: "current" | "color" | "fromtheme" | "transparent". reverse: true = play the animation backwards (time reversal). image_options: "on"/"off" — enable optional image components (title/legend/axes/logo). show_legend: plot legend on/off when image_options="on". show_title: plot title on/off when image_options="on". extra_properties: raw COMSOL Animation export properties to override, e.g. {"repeat": "forever", "resolution": "150"}. tag: explicit export feature tag (auto "anim1", "anim2", ...). model: model name/tag (None = current model). Returns: JSON with path, size, format, frame count, dimensions, fps, duration and valid flag; for image sequences also frame_paths. |
| anim_export_framesA | Export a numbered PNG image sequence from a COMSOL plot group (native imageseq). This is COMSOL's own frame exporter: it writes Args: plotgroup: plot group tag to export, e.g. "pg1". directory: directory for the frames (default: artifact workspace). base: frame base name/path, e.g. "C:/out/frame" -> frame1.png, ...; the actual COMSOL naming is discovered automatically. maxframes: maximum number of frames to write (>= 2, default 25). width: frame width in px (default 640). height: frame height in px (default 480). solnumtype: "all" | "level1" | "level2" | "level3" | "inner" | "outer". solnum: explicit 1-based solution numbers, e.g. [1,2,3,4]. sweeptype: "solutions" (default) | "parameter" | "globalparameter". tag: explicit Animation export feature tag. model: model name/tag (None = current model). Returns: JSON with directory, frame_paths, frame count, base path and validity. |
| anim_createA | Render a simulation animation from an existing plot group (custom pipeline). Recommended default for building animations: exports one PNG per transient
time step (plot-group property Args: plotgroup: plot group tag with the quantity to animate, e.g. "pg1". formats: ["gif"] (default), ["gif","mp4"] or ["mp4"]. MP4 requires imageio + imageio-ffmpeg (media_tools_status reports availability). fps: animation speed, frames per second (default 10). width: frame width in px (default 640). height: frame height in px (default 480). mode: "auto" (default; detects transient vs parametric from the dataset), "time" (transient time steps), "solutions" (1-based solution index), "static" (single frame). times: explicit time values for transient frames, e.g. [0,1,2,5,10] (interpolated times are supported by COMSOL). solnums: explicit 1-based solution indices, e.g. [1,2,3,4]. max_frames: cap the number of frames (evenly spaced selection). range_mode: "common" (default; one colour range for all frames, no flicker), "auto" (per-frame COMSOL range) or "manual" (use color_range). color_range: [min, max] data range for range_mode="manual", e.g. [293.15, 400.0] for a temperature animation. colortable: COMSOL colour table name, e.g. "ThermalLight" or "Rainbow". title: optional title text burned into every frame (Pillow overlay). loop: GIF loop count (0 = loop forever, default). output: explicit output file path (only when one format is requested), e.g. "C:/out/heat.gif". output_directory: directory for generated GIF/MP4 files. frames_directory: directory for intermediate PNG frames. keep_frames: keep intermediate PNG frames on disk (default false). model: model name/tag (None = current model). Returns: JSON with frame count/directory/frames, mode used, colour range and the generated "gif"/"mp4" objects (path, size, frame count, duration, valid), plus "preview" (first frame PNG) and "primary" (best artifact path). |
| anim_quickA | One-call animation: plot an expression over time/solutions and write GIF/MP4. Creates a plot group + plot feature for Args: expression: COMSOL expression to plot, e.g. "T", "ht.T", "u", "sqrt(u^2+v^2)". plot_type: "surface2d" (default for 2D models) | "surface3d" | "volume" | "slice" | "contour2d" | "isosurface" | "arrow2d" | "arrow3d" | "streamline" | "line" | "global" | "point". dataset: dataset tag, e.g. "dset1" (None = COMSOL default dataset). formats: ["gif"] (default) | ["gif","mp4"] | ["mp4"] (mp4 needs imageio-ffmpeg). fps: frames per second (default 10). width: frame width px (default 640). height: frame height px (default 480). mode: "auto" (default) | "time" | "solutions" | "static". times: explicit transient times, e.g. [0,2,4,6,8,10]. solnums: explicit 1-based solution indices. max_frames: cap number of frames. range_mode: "common" (default) | "auto" | "manual". color_range: [min, max] data range for range_mode="manual". colortable: COMSOL colour table, e.g. "ThermalLight". title: title text burned into each frame. output: explicit output path for a single-format run. output_directory: directory for generated GIF/MP4 files. frames_directory: directory for intermediate PNG frames. model: model name/tag (None = current model). Returns: JSON with plotgroup, expression, frame count, colour range and the generated gif/mp4 artifact objects (path, size, frames, duration, valid). |
| anim_listA | List animation export features and plot groups that can be animated. Use this first to discover: (a) existing COMSOL Animation export features and their settings/output files, (b) every plot group with its dataset, solution, frame mode ("time"/"solutions"/"static") and frame count, and (c) whether GIF/MP4 tooling is available. Args: model: model name/tag (None = current model). |
| anim_removeA | Remove a COMSOL Animation export feature from the results tree. Args: tag: animation export feature tag, e.g. "anim1" (see anim_list). model: model name/tag (None = current model). |
| anim_add_titleA | Add a title bar/overlay to every frame of an existing GIF or video. Args: source: input animation path (.gif, .mp4, .avi, .webm). title: title text (\n creates multiple lines). output: output path (.gif or .mp4); defaults to beside the input with a "_titled" suffix; format follows the output suffix. position: "top" (default) | "bottom" | "overlay-top" | "overlay-bottom". font_size: title font size in px (default 18). fps: output frame rate (default: detected from the source, else 10). |
| anim_resizeA | Resize an animation (GIF/video) — proportional or exact dimensions. Args: source: input animation path. output: output path (.gif or .mp4); defaults beside the input with a "_resized" suffix. width: target width in px (height follows the aspect ratio when only width is given). height: target height in px (width follows the aspect ratio when only height is given). fps: output frame rate (default: detected from the source, else 10). |
| anim_combineB | Concatenate several animations (or frame sets) into one GIF/MP4. Args: inputs: list of animation paths (.gif/.mp4) or frame directories, played in the given order. output: output path (.gif or .mp4); default auto-generated .gif. fps: output frame rate (default: detected from the first input, else 10). max_width: downscale all frames to at most this width. |
| anim_previewA | Extract a preview image of an animation (first frame and/or contact sheet). Args:
source: animation path (.gif/.mp4) or frames directory.
output: output PNG path (auto-generated when omitted).
contact_sheet: true = also build a grid montage of up to |
| anim_extract_framesB | Extract frames from a GIF/video into numbered PNG files. Args: source: animation path (.gif, .mp4, .avi, .webm). directory: output directory (default: artifact workspace). prefix: file prefix, e.g. "frame" -> frame0001.png. max_frames: maximum number of frames to extract. |
| anim_convertA | Convert an animation between formats (e.g. GIF -> MP4 or MP4 -> GIF). Args: source: input animation path. output: output path; suffix decides the container (.gif or .mp4). fps: output frame rate (default: detected from the source, else 10). max_frames: use at most this many frames. |
| media_frames_to_gifA | Compose PNG/JPG image frames into an animated GIF (Pillow; no COMSOL needed). Args: frames: list of image paths, or a one-element list containing a frames directory, e.g. ["C:/out/frames"] (files are sorted naturally). output: output .gif path (auto-generated when omitted). fps: frames per second (default 10; converted to GIF frame duration). loop: 0 = loop forever (default), n = repeat n times. optimize: optimise the GIF palette/file size. title: optional title text drawn on every frame. title_position: "top" (default) | "bottom" | "overlay-top" | "overlay-bottom". title_font_size: title font size px (default 18). max_width: downscale frames wider than this. max_frames: keep at most this many frames (evenly spaced). hold_last_s: extra seconds to show the last frame. |
| media_frames_to_mp4A | Compose PNG/JPG image frames into an H.264 MP4 (imageio + imageio-ffmpeg). Requires imageio and imageio-ffmpeg (check media_tools_status). Frames are padded to even dimensions automatically (H.264 requirement). Args: frames: list of image paths or a one-element frames directory list. output: output .mp4 path (auto-generated when omitted). fps: frames per second (default 10). quality: imageio-ffmpeg quality 0..10 (8 = good, default). title: optional title text drawn on every frame. title_position: "top" (default) | "bottom" | "overlay-top" | "overlay-bottom". max_width: downscale frames wider than this. max_frames: keep at most this many frames (evenly spaced). hold_last_s: extra seconds to show the last frame. |
| media_infoA | Probe an animation or image: frame count, duration, fps, dimensions, size. Args: path: media file path (.gif, .mp4/.avi/.webm/.mov or .png/.jpg/.bmp). |
| media_tools_statusA | Report media tooling availability: Pillow, imageio, imageio-ffmpeg, ffmpeg. Use before requesting MP4 output; GIF output only needs Pillow. |
| export_typesB | List file-export formats supported by COMSOL 6.4 (mesh, geometry, model).
|
| export_listC | List result export features and available mesh/geometry export tools. Args: model: model name/tag (None = current model). |
| export_meshA | Export a mesh to a file (STL, Nastran, 3MF, PLY, COMSOL native). Uses COMSOL's mesh export tool: sets Args:
tag: mesh tag (default Example: export_mesh("mesh1", type="stl", path="C:/out/mesh.stl") |
| export_geometryA | Export a finalized geometry to STL, STEP, IGES, Parasolid, ACIS or native. Uses COMSOL's geometry export tool: Args:
type: Notes: STEP/IGES/Parasolid/ACIS need the CAD Import Module or a CAD LiveLink license; STL and native formats work with the base installation. STL exports the boundary surface of the geometry. Example: export_geometry("step", path="C:/out/part.step") export_geometry("stl", path="C:/out/part.stl") |
| export_model_fileA | Save the model as a COMSOL Args:
path: output .mph path (auto under Returns:
|
| export_model_javaA | Export the model as a COMSOL Java model file ( Verified live in COMSOL 6.4: Args:
path: output Returns:
|
| export_plotA | Create (optionally run) a result The Args:
tag: export feature tag.
plotgroup: plot group tag to export (e.g. Returns:
|
| export_touchstoneA | Create (optionally run) a Touchstone export is only meaningful for RF models with S-parameters
( Args:
tag: export feature tag.
path: output Touchstone path; tried with the filename properties of
the feature ( Returns:
|
| export_removeB | Remove a result export feature (Image/Plot/Touchstone/...). Args: tag: result export feature tag. model: model name/tag (None = current model). |
| report_listB | List report features (Report/Presentation/Template) in the model. Args: model: model name/tag (None = current model). |
| report_createA | Create a report feature and configure its output template/format. COMSOL 6.4 facts discovered live: the Args:
tag: report tag (default Returns:
|
| report_add_sectionA | Add a top-level report section node (Section/TitlePage/TableOfContents). Args:
report: report tag (see report_list).
section_type: Returns:
|
| report_add_contentA | Add a content node (plot, mesh, table, text, ...) inside a Section. Content nodes reference existing model nodes through their Args:
report: report tag.
section: target section tag (see report_add_section).
content_type: Returns:
|
| report_generateA | Write the report to an HTML or DOCX file and verify it on disk. A report with no content sections produces NO file (COMSOL returns
without writing); add at least one Section with report_add_section /
report_add_content first. HTML reports also create a sibling
Args:
report: report tag (see report_list).
path: output file path; extension chooses the format unless
Returns:
|
| geom_listA | List the geometry sequences of all components with their settings. Args: model: model name/tag (None = current model). Returns per-geometry dimension, axisymmetry, length unit, feature count, entity counts (if built) and bounding box. |
| geom_createA | Create a new geometry sequence for a component. Args: geometry: tag of the new geometry (must be unique in the model), e.g. "geom2". component: component tag (None = first component, usually "comp1"). dimension: 3 (3D), 2 (2D), 1 (1D), or "2Daxi" for axisymmetric 2D. axisymmetric: mark a 2D geometry as axisymmetric (same as dimension="2Daxi"). model: model name/tag (None = current model). |
| geom_buildB | Build a geometry sequence (all features or up to one feature). Args: geometry: geometry sequence tag (default "geom1"). upto: build only features up to and including this feature tag (None = all). model: model name/tag (None = current model). Returns entity counts, bounding box, object names and any build problems. |
| geom_run_featureA | Build the geometry up to and including one feature. The returned counts reflect the current build state; call Args: tag: feature tag to run up to (e.g. "blk1", "dif1"). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). |
| geom_validateA | Check a geometry sequence for problems (optionally rebuild first). Args: geometry: geometry sequence tag (default "geom1"). build: run the sequence first to collect build errors (slower but thorough). model: model name/tag (None = current model). |
| geom_statsB | Summarize a geometry: space dimension, entity counts, bbox, objects. Args: geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). Entity dimensions: 3 = domains, 2 = boundaries (faces), 1 = edges, 0 = points. |
| geom_bboxA | Return the bounding box of the geometry (or of selected objects). Args: geometry: geometry sequence tag (default "geom1"). objects: object names to include (None = whole geometry). model: model name/tag (None = current model). |
| geom_entity_infoA | Enumerate geometry entities with bbox, center and measure (area/volume/length). Use this to choose entity numbers for boundary conditions, e.g. find the top faces of a block (filter_bbox with zmin=zmax=0.02). Args: entity_dim: 3 = domains, 2 = boundaries/faces, 1 = edges, 0 = points (in 2D use 2 = domains, 1 = boundaries, 0 = points). filter_bbox: optional [xmin,xmax,ymin,ymax(,zmin,zmax)] with null for unbounded sides, e.g. [null,null,null,null,0.019,0.021]. condition: how to compare an entity bbox with filter_bbox: "inside" (default), "intersects", or "center". tol: tolerance for the bbox comparison (in geometry length units). limit: maximum number of entities returned (default 100, max 500). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). |
| geom_addA | Create any geometry feature (type from the geometry catalog). Args: feature_type: COMSOL geometry feature type, e.g. "Block", "Cylinder", "Difference", "Array", "BoxSelection", "Fillet3D", "Import". Invalid types return suggestions from the catalog. tag: feature tag (None = generated from the catalog tag prefix). label: optional display label. properties: dict of feature properties, e.g. {"size": ["0.1","0.05","0.02"]}. build: build the sequence after creating the feature (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_primitiveA | Create a primitive geometry object with ergonomic aliases. Args:
kind: Block | Cylinder | Sphere | Cone | Torus | Pyramid | Hexahedron |
Tetrahedron | Ellipsoid | Helix | Point | LineSegment | Polygon |
Rectangle | Square | Circle | Ellipse | Interval
(aliases: box, ball, rect, disk, line...).
size: size expressions; Block [l,w,h], Rectangle [w,h], Square/Interval
scalar. Units follow the geometry length unit, e.g. ["0.1","0.05","0.02"].
pos: position [x,y] or [x,y,z] (base point; see |
| geom_booleanB | Combine geometric objects with a Boolean operation. Args:
operation: Union | Intersection | Difference | Compose | Partition
(case-insensitive; "difference" removes |
| geom_transformA | Move, copy, rotate, scale, mirror, array or rigidly transform objects. Args: operation: Move | Copy | Rotate | Scale | Mirror | Array | RigidTransform. objects: object names to transform (e.g. ["blk1"]). displ: translation vector for Move/Copy/Array, e.g. ["0.1","0","0"]. pos: center point for Rotate/Scale/Mirror, e.g. ["0.05","0.025","0"]. axis: axis/normal vector for Rotate/Mirror, e.g. ["0","0","1"] or "z". rot: rotation angle in degrees (Rotate/RigidTransform). factor: scale factor (Scale), scalar or [sx,sy,sz]. size: array size (Array): integer (linear) or [n1,n2,n3] (rectangular/3D). properties: extra COMSOL properties (e.g. {"keep": "on"}). tag: feature tag (None = automatic, e.g. mov1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_extrudeA | Extrude 2D work-plane objects (or planar faces) into 3D. Args: distance: extrusion distance expression/humber, e.g. 0.2 or "0.2". A list creates several layers, e.g. [0.1, "0.2"]. input_objects: work-plane tags/objects to extrude (None = objects of the last preceding work plane). scale: scale factor of the extrusion top (optional). twist: twist angle in degrees (optional). properties: extra COMSOL properties for the Extrude feature. tag: feature tag (None = automatic, e.g. ext1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_revolveB | Revolve 2D work-plane objects into 3D. Args: angle: revolution angle in degrees (360 = full revolution). input_objects: work-plane tags/objects to revolve (None = last work plane). pos: point on the axis in the work-plane local system, e.g. [0, 0]. axis: axis direction in the work-plane local system, e.g. [0, 1]. properties: extra COMSOL properties (e.g. {"axistype": "2d"}). tag: feature tag (None = automatic, e.g. rev1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_sweepA | Sweep faces/edges/points along a spine curve. Args: entities: entities to sweep as {"object": [entity numbers]}, e.g. {"blk1": [3]}; or a flat list with a single object in the geometry. entity_dim: dimension of the entities to sweep (default 2 = faces). spine: spine edges as {"object": [edge numbers]}, e.g. {"ls1": [1]}. properties: extra COMSOL properties (e.g. {"keep": "on"}). tag: feature tag (None = automatic, e.g. swe1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_loftB | Loft between a list of profile faces/edges/points. Args: profiles: geometry object names used as loft profiles, in order, e.g. ["wp1", "wp2"] or named-selection tags. properties: extra COMSOL properties (e.g. {"unite": "on"}). tag: feature tag (None = automatic, e.g. loft1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_thickenA | Thicken surfaces/boundaries into a solid shell (3D) or 2D thicken. In 3D the COMSOL Args: objects: surface object names to thicken (3D), e.g. ["blk1"] (None = all current objects). In 2D these are ignored. entities: boundaries to thicken as {"object": [edge numbers]} (2D only). entity_dim: entity dimension for the 2D selection (default 1 = boundaries). thickness: total thickness (symmetric offset), e.g. 0.002. offset: "symmetric" (default) or "asymmetric". upthick: upward thickness for asymmetric offset. downthick: downward thickness for asymmetric offset. keep: keep input objects. properties: extra COMSOL properties. tag: feature tag (None = automatic, e.g. thi1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_midsurfaceB | Extract the midsurface of thin solid objects (3D). Args: objects: solid object names to extract the midsurface from (None = all current objects). properties: extra COMSOL properties (e.g. {"keep": "on"}). tag: feature tag (None = automatic, e.g. mid1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_workplaneB | Create a work plane (and optionally 2D features inside it). Args: quickplane: coordinate plane of a quick work plane: xy | yz | zx | yx | zy | xz. quickx/quicky/quickz: offset coordinate of the plane (depends on quickplane). planetype: advanced work plane definition type (None = "quick"). features: 2D features created inside the work plane, each a dict like {"type": "Rectangle", "size": ["1","0.5"], "pos": ["0","0"]}. Supported keys: type, tag, label, properties (+ the primitive aliases size/pos/r/rot/semiaxes). properties: extra WorkPlane properties. tag: feature tag (None = automatic, e.g. wp1). label: display label. build: build the sequence after creating/building the plane (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_filletA | Round corners/edges with a fillet (2D vertices or 3D edges). Args: entities: vertices to fillet in 2D as {"object": [vertex numbers]}, or edges in 3D as {"object": [edge numbers]}. A flat list is accepted when the geometry has exactly one object. objects: object names (needed for a flat entity list with several objects). radius: fillet radius in geometry length units, e.g. 0.1. properties: extra COMSOL properties. tag: feature tag (None = automatic, e.g. fil1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_chamferA | Bevel corners/edges with a chamfer (2D vertices or 3D edges). Args: entities: vertices to chamfer in 2D as {"object": [vertex numbers]}, or edges in 3D as {"object": [edge numbers]}. objects: object names (for a flat entity list). distance: chamfer distance in length units (2D "dist"; 3D uses the COMSOL Chamfer3D radius-like property with the same value). properties: extra COMSOL properties (may override distance). tag: feature tag (None = automatic, e.g. cha1). label: display label. build: build after creation (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_importB | Import a CAD or mesh file into the geometry sequence (STEP/IGES/DXF/STL...). Args: filename: absolute path to the file (STL, STEP, IGES, DXF, mphbin, ...). tag: feature tag (None = automatic, e.g. imp1). label: display label. properties: extra Import properties, e.g. {"importtype": "full3d", "type": "cad", "repairgeom": "on"} (COMSOL auto-detects most formats). build: build after importing (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_exportB | Export geometry objects to a CAD/mesh file (STL, STEP, IGES, DXF, ACIS...). Args: export_type: stl | stlascii | step | iges | dxf | acisbin | acisascii | parasolidbin | parasolidascii | nativebin | nativeascii. (VTK/3MF are not supported by COMSOL geometry export.) path: output file path; when omitted the file goes to the artifact workspace with an automatic name. objects: geometry object names to export (None = current objects). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). Returns the absolute file path, size and confirmed existence. |
| geom_selection_actionsA | Create a geometry-sequence selection feature and return matched entity numbers. The returned numbers are GLOBAL entity numbers of the finalized geometry (the same numbering physics boundary conditions use), so they can be passed straight to physics/material/feature selections. Args: selection_type: BoxSelection | BallSelection | CylinderSelection | DiskSelection | ExplicitSelection | AdjacentSelection | UnionSelection | IntersectionSelection | DifferenceSelection | ComplementSelection | LogicalExpressionSelection. tag: selection feature tag (None = automatic, e.g. boxsel1). entity_dim: entity dimension to select: 3=domains, 2=boundaries, 1=edges, 0=points, -1=whole objects (default 2). entities: explicit entities for ExplicitSelection as {"object": [ids]}. xmin/xmax/ymin/ymax/zmin/zmax: box limits (BoxSelection); null = unbounded. condition: intersects | inside | somevertex | allvertices. pos: position for BallSelection ([x,y,z]) or CylinderSelection/DiskSelection (Disk: [x,y]; Cylinder: 3D base point). r: radius (Ball/Cylinder/Disk) or cylinder outer radius. axis: axis for CylinderSelection, e.g. ["0","0","1"] or "z". input/add/subtract: tags of preceding selection features used by the set-operation selections (Union/Intersection/Difference/Complement/ Adjacent/LogicalExpression). expression: logical expression for LogicalExpressionSelection, e.g. "sel1&!sel2" (use input tags). cumulative: also create a cumulative selection with this tag and let the new feature contribute to it. properties: extra selection feature properties (e.g. {"selshow": "off"}). label: display label. build: build the geometry after creating the selection (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). model: model name/tag (None = current model). |
| geom_delete_featureA | Delete a feature from a geometry sequence. Args: tag: feature tag to delete (e.g. "cyl1"; the automatic "fin" cannot be deleted). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). |
| geom_reorder_featureB | Move a feature to a new position in the geometry build order. Args: tag: feature tag to move. index: target 0-based position among user features (0 = first). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). |
| geom_get_propertiesB | Return all properties of a geometry feature (with value types). Args: tag: feature tag (e.g. "blk1"). include_allowed: include allowed values (validates enums such as "on"/"off"). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). |
| geom_set_propertiesA | Set properties on a geometry feature (expressions may include units). Args: tag: feature tag (e.g. "blk1"). properties: dict of property name -> value, e.g. {"size": ["0.2","0.1","0.05"]} or {"r": "0.01"}. Invalid names return the available properties. build: rebuild the geometry after setting (default false). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). |
| geom_rename_featureB | Change a feature's display label and/or its tag. Args: tag: current feature tag. label: new display label (None = keep). new_tag: new programmatic tag (None = keep). Referenced selections may need updating afterwards. geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). |
| geom_measureA | Measure volume/area/length/bbox of selected entities on the finalized geometry. Args: entity_dim: 3 = domains (volume), 2 = boundaries/faces (area), 1 = edges (length), 0 = points (coordinates). In 2D: 2 = domains (area), 1 = boundaries (length), 0 = points. entities: 1-based global entity numbers (None = all entities of that dimension). geometry: geometry sequence tag (default "geom1"). model: model name/tag (None = current model). Returns the primary metric (volume/area/length), bbox, vertex coords and the selected entity list. |
| java_evalA | Execute Python code against the live COMSOL Java API (escape hatch). g = m.geom("geom1") g.run() result = {"domains": g.getNDomains(), "boundaries": g.getNBoundaries()}''' -> {"domains": 1, "boundaries": 6} |
| docs_listA | List the curated COMSOL guides bundled with this server. Use this first when you need COMSOL domain knowledge (modelling workflow,
geometry/physics/materials/mesh/study/results/plot/animation guides, API
quirks, units, troubleshooting). Then call |
| docs_getA | Return one curated COMSOL guide as Markdown text. Available guides: getting_started, workflow_overview, geometry_guide, physics_guide, materials_guide, meshing_guide, study_solver_guide, results_guide, plotting_guide, animation_guide, troubleshooting, api_cheatsheet, units_and_expressions. Args: name: guide name or alias (e.g. "geometry", "mesh", "study", "results", "animation", "api", "units"). Call docs_list for the full list. |
| docs_searchA | Search the knowledge base: curated guides and/or the installed COMSOL docs. Args: query: free-text query, e.g. "heat flux boundary", "jacobian", "animation gif", "solid.mises", "selection empty". scope: "guides" (default, 13 curated guides), "help" (search the offline COMSOL 6.4 HTML documentation installed on this machine; manual, programming reference and API javadoc), or "all" (both). limit: maximum results (1-50, default 10). |
| docs_workflowA | Recommend an ordered MCP tool sequence and guides for a modelling goal. Curated workflows exist for steady/transient heat transfer, structural mechanics, fluid flow, acoustics, electromagnetics, wave optics, particle tracing, parametric sweeps, animations and starting from an installed example model. Args: goal: free text, e.g. "steady heat transfer", "stress analysis of a bracket", "laminar flow in a channel", "animate temperature", "parametric sweep". Omit to list all available workflows. |
| library_listA | Browse installed COMSOL example models grouped by module. Args: module: module folder filter, substring/case-insensitive, e.g. "Heat_Transfer_Module", "ACDC", "Structural". dimension: "3D"/"3", "2D"/"2", "1D"/"1", or "unknown". category: category sub-folder filter, e.g. "Tutorials", "Verification", "Applications", "Phase_Change". limit: models returned per page (1-500, default 50). offset: page offset for paging through large result sets. |
| library_searchA | Search the installed COMSOL model library (keyword + physics/study filters). Results are scored against title, physics interfaces, study steps, module and
category. Use the returned Args: query: keywords matched against model title/physics/studies/path, e.g. "heat transfer", "conjugate heat transfer pipe", "eigenfrequency tuning fork", "brownian particle". physics: physics interface filter, e.g. "HeatTransfer", "SolidMechanics", "LaminarFlow", "Electrostatics" (substring, case-insensitive). study_type: study step filter: "Stationary", "Transient", "Frequency", "Eigenfrequency", "Parametric", "RayTracing", ... quick_only: only models expected to run in < 60 s (or < 10 MB when the stored run time is unknown). Default True; set False to include heavy models. module: optional module folder filter (e.g. "Heat_Transfer_Module"). dimension: optional "1D"/"2D"/"3D" filter. limit: maximum results (1-500, default 50). |
| library_describeA | Full metadata for one library model: physics, studies, documentation, cost. Args: id_or_path: library id from library_search/library_list (e.g. "Heat_Transfer_Module/Tutorials,_Conduction/heat_conduction_in_slab"), a unique model stem, or an absolute path to any .mph file. |
| library_categoriesB | Module and category counts for the installed COMSOL model library. |
| library_statsB | Statistics of the installed model library: model counts, dimensions, study types. |
| library_loadA | Load an installed COMSOL example model (.mph) into the running session. The original file is opened read-only; use model_save / library_run to write a copy into the workspace. Models with companion .mphbin data must be loaded from their installed path (this tool always does that). Args: id_or_path: model id (from library_search) or absolute .mph path. name: optional name for the loaded model (default: file stem). |
| library_runA | Load a library model, solve it, and save a solved copy to the workspace. Synchronous and blocking (all COMSOL work is serialised) -- intended for small
models: check Args:
id_or_path: model id (from library_search) or absolute .mph path.
study: optional study tag/name to solve (e.g. "std1"); default = all studies.
save_path: target .mph path; default = workspace artifact root
|
| mat_library_listA | List material libraries, or the materials of one library. The catalog is built offline from the COMSOL installation (3141 materials in 19 libraries for COMSOL 6.4) and needs no running COMSOL session. Args: library: library id or label, e.g. "comsol_basic_material_lib" or "Built-in" / "Fluids" / "AC/DC" / "Optical". Omit to list libraries. category: optional category filter (e.g. "Gases", "Liquids", "Rare earth permanent magnets") when listing materials. query: optional name/tag substring filter. limit: maximum number of materials to return (default 100, max 1000). offset: pagination offset. Returns: {"libraries": [...]} when no library is given, otherwise {"library": ..., "total": N, "materials": [{name, path, category, ...}]}. |
| mat_library_searchA | Search COMSOL material libraries by name/tag/category. Args: query: search text, e.g. "copper", "ndfeb", "water", "glass". library: restrict to one library id/label (e.g. "Built-in", "Optical"). category: restrict to a category (e.g. "Liquids", "Gases"). property: only materials that define this property, e.g. "thermalconductivity" or "dynamicviscosity". limit: maximum number of results (default 30). Example: mat_library_search(query="water", library="Fluids", property="dynamicviscosity") |
| mat_library_categoriesA | List material-library categories (GUI folders) with material counts. Args: library: restrict to one library id/label; omit to list all libraries. limit: maximum number of category rows returned. Example: mat_library_categories(library="Fluids") -> Gases (12), Liquids (13) |
| mat_library_infoA | Show full offline catalog data for one library material. Returns the exact library path ( Args: name: material display name ("Copper"), tag ("copper") or full path ("comsol_basic_material_lib.copper"). library: optional library id/label to disambiguate (e.g. "Fluids"). |
| mat_addA | Add (copy) a material from a COMSOL material library to a component. Reproduces the GUI "Add Material from Library" workflow: creates a
Args:
name: exact library material name, e.g. "Copper", "Silicon",
"Water, liquid" (see mat_library_search / mat_library_list).
A full path such as "comsol_basic_material_lib.copper" also works.
library: library id or label to disambiguate ("Built-in", "Fluids",
"Optical", ...). Recommended when a name exists in several
libraries (e.g. "Air").
component: component tag (default "comp1"); pass "" or "global" to
create a global material under model definitions.
selection: domain numbers to assign the material to (3D: domains,
2D: domains). Omit to leave the material unassigned.
named: named selection tag to assign instead of |
| mat_createA | Create a manual material with explicit properties (no library needed). Args:
name: material display name, e.g. "My alloy" (becomes the label).
properties: Basic-group properties (def group), values are COMSOL
expressions with units, e.g.
{"thermalconductivity": "400[W/(mK)]",
"density": "8960[kg/m^3]", "heatcapacity": "385[J/(kgK)]"}.
Anisotropic tensors can be given as lists of 9 values.
groups: extra property groups, e.g. {"Enu": {"E": "200[GPa]",
"nu": "0.3"}}; group tags use COMSOL's built-in types
("Enu" = Young's modulus and Poisson's ratio, "linzRes",
"idealGas", ...).
material_type: "Common" (default, works for all physics) | "Solid" |
"Fluid" | "PorousMedia" | "Multiphase" | "Switch" | "External" |
"LayeredMaterial" | ...
component: component tag (default "comp1"); "" or "global" = global.
selection: domain numbers to assign the material to.
named: named selection tag to assign instead of |
| mat_listA | List the materials of a component (and optionally global materials). Args: component: component tag (default "comp1"); "" or "global" lists only global materials. include_global: also list global-definition materials. model: model name/tag (None = current model). |
| mat_propertiesA | Read all property groups and property values of a material. For library materials the library link is refreshed ( Args: tag: material tag, e.g. "mat1" (see mat_list). component: component tag (default "comp1"); "" or "global" for global materials. group: read only this property group tag ("def", "Enu", ...). include_descriptions: include COMSOL's per-property descriptions (localized to the COMSOL installation language). model: model name/tag (None = current model). Example: mat_properties(tag="mat1", group="def") -> properties.thermalconductivity = "400[W/(m*K)]", density = "8960[kg/m^3]" |
| mat_set_propertyA | Set one material property (a COMSOL expression with units). Args: tag: material tag, e.g. "mat1". property: property name, e.g. "thermalconductivity", "density", "heatcapacity", "youngsmodulus". Use mat_properties first to see valid names for the material. value: expression string ("400[W/(m*K)]"), number, or list of expressions for anisotropic/array properties (9 values for a 3x3 tensor). group: property group tag (default "def" = Basic). index: optional index for setting one element of an array property. component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model). Example: mat_set_property(tag="mat1", property="density", value="8000[kg/m^3]") |
| mat_assignB | Assign a material to domains (explicit numbers, named selection or all). In COMSOL, materials are assigned to domains (3 in 3D, 2 in 2D). Args: tag: material tag, e.g. "mat1". entities: domain entity numbers, e.g. [1, 2]. named: named selection tag (created with selection tools). all_domains: true = assign every domain. component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model). |
| mat_get_selectionB | Read the domain selection of a material. Args: tag: material tag, e.g. "mat1". component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model). |
| mat_removeB | Remove a material from a component (or from global definitions). Args: tag: material tag, e.g. "mat1". component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model). |
| mat_renameA | Rename a material's display label and/or change its tag. Args: tag: current material tag, e.g. "mat1". label: new display name shown in COMSOL (e.g. "Copper (annealed)"). new_tag: new material tag, e.g. "copper" (references in tree paths change; selections are kept). component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model). |
| mat_import_xmlA | Import materials from a COMSOL material XML file (.xml) into the model. The XML file may contain one or more 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). |
| mesh_listA | List mesh sequences with their geometry, features and element counts. Args: component: restrict to one component tag (None = all components). model: model name/tag (None = current model). |
| mesh_create_sequenceA | Create a mesh sequence on a geometry. Args: geometry: geometry tag to mesh, e.g. "geom1" (None = first geometry of the first component). tag: mesh sequence tag (None = auto "mesh1", "mesh2", ...). component: component tag (None = first component containing a geometry). auto_size: predefined mesh size 1 (extremely fine) ... 9 (extremely coarse). automatic: true = COMSOL automatic mesh (default), false = user-controlled. model: model name/tag (None = current model). Example: mesh_create_sequence(geometry="geom1", auto_size=5) |
| mesh_featuresA | List the features (and child features) of a mesh sequence. Includes each feature's type, tag, label, selection and current properties (build metadata omitted). Args: mesh: mesh sequence tag (None = first mesh sequence in the model). component: component tag (None = auto-detect from the mesh tag). model: model name/tag (None = current model). |
| mesh_add_featureA | Create a mesh feature of any COMSOL type (generic escape hatch). Valid types come from Args:
feature_type: COMSOL mesh feature type, e.g. "FreeTet".
mesh: mesh sequence tag (None = first).
tag: feature tag (None = auto from the type, e.g. "ftet1").
properties: feature properties, e.g. {"method": "delaunay"}.
Property names must match COMSOL's; use mesh_features to read the
available names of existing features.
selection: geometric entity numbers to select.
named: named selection tag to select instead.
all_entities: select all entities of |
| mesh_set_propertyA | Set properties on an existing mesh feature (e.g. FreeTet method, BL layers). Args:
mesh: mesh sequence tag (None = first).
feature: mesh feature tag, e.g. "ftet1" (None = the last feature).
property: one property name, e.g. "method", "blnlayers".
value: value for |
| mesh_auto_sizeB | Use a COMSOL predefined mesh size (1 = extremely fine ... 9 = extremely coarse). Args: size: predefined size level 1..9 (default 5 = normal). mesh: mesh sequence tag (None = first). component: component tag (None = auto-detect). model: model name/tag (None = current model). |
| mesh_set_sizeA | Set explicit mesh size properties (hmax, hmin, growth rate, ...). When Args: hmax: maximum element size, e.g. "0.05" (model length unit) or "5[mm]". hmin: minimum element size. hgrad: maximum element growth rate (e.g. "1.5"). hcurve: curvature factor (e.g. "0.6"). hnarrow: resolution of narrow regions (e.g. "0.5"). hauto: predefined size level 1..9 (sets automatic sizing). mesh: mesh sequence tag (None = first). feature: existing size feature tag to edit (None = global "size"). selection: domain/boundary numbers for a localized size feature. named: named selection tag for the size feature. all_entities: apply the localized size to all entities. entity_dim: selection dimension for the localized size (default geom dim). user_controlled: switch the sequence to a user-controlled mesh (default true). component: component tag (None = auto-detect). model: model name/tag (None = current model). Example: mesh_set_size(hmax="0.02", hmin="0.002", hgrad="1.3") |
| mesh_free_tetA | Create (or configure) a FreeTet feature and select domains to mesh. Args:
properties: FreeTet properties, e.g. {"method": "delaunay"} or
{"optlevel": "high"}. Known names: method, smoothcontrol,
smoothmaxiter, smoothmaxdepth, optlevel, numlayer,
xscale/yscale/zscale, ...
selection: domain numbers to mesh (default all domains).
named: named selection of domains instead of |
| mesh_free_triB | Create (or configure) a FreeTri feature (2D domains, or 3D boundaries). Args:
properties: FreeTri properties, e.g. {"method": "delaunay",
"smoothmaxiter": "4"}.
selection: entity numbers to mesh (2D: domains; 3D: boundaries).
named: named selection instead of |
| mesh_mappedA | Create a mapped mesh feature (quadrilateral/hexahedral surfaces). In 2D the mapped mesh covers domains (quad elements); in 3D it maps boundary faces. The mapped region needs a compatible shape (4 edges); COMSOL reports a clear error otherwise. Args:
properties: Map properties, e.g. {"interpmethod": "auto"}.
selection: domain/face numbers to map.
named: named selection instead of |
| mesh_sweepA | Create a swept mesh feature (hexahedral/prism elements along a sweep path). Args:
properties: Sweep properties, e.g. {"element": "hex", "sweeppath": "auto"}
(element: "hex" | "hexdominant" | "prism"; default hexdominant).
domains: domain numbers to sweep (default all domains).
named: named selection of domains instead of |
| mesh_boundary_layersA | Add boundary layers (prism elements) on selected boundaries. Creates a Args: layers: number of boundary layers (default 3). stretching: stretching factor between consecutive layers (default 1.2). thickness: first-layer thickness or total thickness, e.g. "0.01" or "1[mm]"; omit to keep COMSOL's automatic thickness. thickness_type: "first" (default, thickness = first layer height) or "total" (thickness = total boundary-layer thickness). domains: domain numbers that receive boundary layers (default all). boundaries: face numbers that get layers (default all faces). named: named selection for the domains. all_domains: apply to all domains (default true). all_boundaries: apply to all boundaries (default true). properties: extra BndLayer/BndLayerProp properties, e.g. {"sharpcorners": "split", "method": "latest"}. mesh: mesh sequence tag (None = first). component: component tag (None = auto-detect). model: model name/tag (None = current model). Example: mesh_boundary_layers(layers=4, stretching=1.3, thickness="0.005", boundaries=[1, 2, 3]) |
| mesh_runA | Build the mesh sequence (shortcut for the COMSOL "Build All"). Args: mesh: mesh sequence tag (None = first). feature: optional feature tag; when given it is validated and the whole sequence is built (COMSOL builds all features in order). component: component tag (None = auto-detect). model: model name/tag (None = current model). Returns: {"ran", "n_elem", "n_elem_by_type", "n_vertex", "min_quality", "mean_quality", "is_complete", ...} |
| mesh_buildB | Build (or rebuild) the mesh — alias of Args: mesh: mesh sequence tag (None = first). feature: optional feature tag to validate before building. component: component tag (None = auto-detect). model: model name/tag (None = current model). |
| mesh_statsB | Mesh statistics: element/vertex counts, quality, type flags, volume. Args: mesh: mesh sequence tag (None = first). component: component tag (None = auto-detect). model: model name/tag (None = current model). Returns: {"n_elem", "n_elem_by_type", "n_vertex", "min_quality", "mean_quality", "has_second_order_elements", "is_complete", ...} plus mesh problems. Note: the clientapi has no max-quality getter. |
| mesh_qualityB | Mesh quality: min/mean quality and a quality-distribution histogram. Args: mesh: mesh sequence tag (None = first). bins: number of histogram bins (default 10). mesh_type: element type to analyse ("tet", "tri", "quad", "hex", "prism"); None = all element types present. component: component tag (None = auto-detect). model: model name/tag (None = current model). |
| mesh_element_countsA | Element counts per geometric entity (domains for tets, boundaries for tris). Useful to verify which domains/boundaries are meshed and whether a simple geometry was meshed as expected. Args: mesh: mesh sequence tag (None = first). types: element types to count ("tet", "tri", "quad", "hex", "prism", "edg", "vtx"); None = all present types. max_entities: cap on reported entities per type (default 200). component: component tag (None = auto-detect). model: model name/tag (None = current model). |
| mesh_exportA | Export the built mesh to a file (STL, NASTRAN, 3MF, PLY, native, ...). Args:
path: target file path (absolute, or relative to the artifact root).
When omitted a timestamped file under |
| mesh_importA | Import a mesh into a mesh sequence (COMSOL COMSOL imports meshes from another mesh sequence, a geometry or a result
dataset. The source is configured through feature properties — e.g.
Args:
mesh: target mesh sequence tag (None = first).
source: source kind ("sequence", "geom", "dataset"); optional.
properties: extra Import properties (sequence, geom, dataset, ...).
tag: feature tag (default auto "imp1").
selection: domain/entity numbers for the import feature.
named: named selection instead of |
| mesh_clearB | Clear the built mesh data (keep the sequence and its features). Args: mesh: mesh sequence tag (None = first). component: component tag (None = auto-detect). model: model name/tag (None = current model). |
| mesh_removeC | Remove an entire mesh sequence from its component. Args: mesh: mesh sequence tag, e.g. "mesh1". component: component tag (None = auto-detect). model: model name/tag (None = current model). |
| mesh_remove_featureB | Remove one mesh feature (and its child features) from a sequence. Args: mesh: mesh sequence tag (None = first). feature: feature tag to remove, e.g. "ftet1". component: component tag (None = auto-detect). model: model name/tag (None = current model). |
| model_createB | Create a new empty COMSOL model with a component and a geometry sequence. Args:
name: model name (None = automatic "Model N").
dimension: geometry dimension: 3 (3D), 2 (2D), 1 (1D), or 2 with
|
| model_loadB | Load a .mph model file into COMSOL. Args: path: absolute path to the .mph file. name: optional name to register the model under. |
| model_saveA | Save a model to an .mph file. Args: model: model name/tag (None = current model). path: target file path. When omitted, saves into the workspace model root. versioned: add a timestamp suffix (keeps previous versions). tag: custom suffix instead of the timestamp. |
| model_listA | List all models currently loaded in COMSOL and mark the current one. |
| model_set_currentB | Select the current model (used by tools that omit the |
| model_describeB | Describe a model: components, physics, materials, meshes, studies, results. |
| model_cloneC | Clone a model under a new name (saved/loaded through a temporary file). |
| model_renameC | Rename a loaded model. |
| model_snapshotB | Save an internal snapshot of a model (used before risky changes). Snapshots live in the scratch directory and can be reloaded with |
| model_removeB | Remove a model from COMSOL memory (does not delete files on disk). |
| model_problemsC | List model problems/warnings reported by COMSOL (physics, mesh, solver). |
| model_parameters_dumpB | Return all model parameters as {name: expression} plus evaluated values. |
| model_open_guiA | Open a model in the COMSOL Desktop GUI (interactive inspection/editing). Saves the current in-memory state first (unless |
| parameter_setB | Define or update global model parameters. Args: values: mapping of parameter name to expression/number, e.g. {"L": "0.1[m]", "T0": "293.15[K]", "n": 10}. descriptions: optional mapping of parameter name to description text. |
| parameter_getC | Get a global parameter expression (or its evaluated numeric value). |
| parameter_listC | List all global parameters as a name鈫抏xpression mapping. |
| parameter_descriptionsC | Return the description text of every parameter. |
| parameter_removeC | Remove one or more global parameters. |
| function_createB | 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. |
| function_listC | List global functions with their types and expressions. |
| function_removeC | Remove a global function by tag/name. |
| variable_setC | Define a global variable expression ( |
| variable_listC | List global variables. |
| variable_removeC | Remove a global variable. |
| selection_createC | Create a named selection on a component (usable by any physics feature). Args: name: selection tag. entity_dim: 3 = domains, 2 = boundaries/faces, 1 = edges, 0 = points. geometry: geometry sequence tag to attach to. kind: Explicit | Box | Ball | Cylinder | Disk | Adjacent | Union | Intersection | Difference | Complement | LogicalExpression. entities: explicit entity numbers (for Explicit selections). properties: extra properties, e.g. {"xmin": "-1", "xmax": "1", "zmin": "0"} for Box selections, or {"condition": "inside"}. |
| selection_listC | List named selections of every component. |
| selection_getC | Show the entities contained in a named selection. |
| selection_removeC | Remove a named selection. |
| phys_listB | List every physics interface in the model. Returns, per interface: component, tag, label, type (e.g. "HeatTransfer"), target geometry tag, space dimension, feature count and active state. Args: model: model name/tag (None = current model). |
| phys_addA | Add a physics interface to a component (e.g. HeatTransfer, SolidMechanics). The interface type is validated against the COMSOL 6.4 catalog; an unknown type returns close matches. The target geometry's space dimension is checked as well (e.g. LaminarFlow needs 2D/3D). Args: type: catalog interface type, e.g. "HeatTransfer", "SolidMechanics", "LaminarFlow", "Electrostatics", "PressureAcoustics", "ElectromagneticWavesFrequencyDomain", "DilutedSpecies". Tag prefixes ("ht") and descriptions are accepted too. tag: interface tag (None = catalog default prefix + number, e.g. "ht"). label: optional display label (e.g. "Heat Transfer in Solids"). geom: target geometry tag (None = first geometry of the component). component: component tag (None = first component). extra_dims: optional extra-dimension tags for reduced models. model: model name/tag (None = current model). |
| phys_infoA | Show one physics interface: type, label, geometry, dimension, features, dependent-variable fields, interface-level property groups and BC aliases. Args: interface: interface tag, label or type (e.g. "ht"). model: model name/tag (None = current model). |
| phys_removeA | Remove a physics interface (and all its features) from the model. Args: interface: interface tag, label or type (e.g. "ht"). model: model name/tag (None = current model). |
| phys_renameB | Rename a physics interface (display label and/or programmatic tag). Args: interface: current interface tag or label. new_label: new display label shown in the COMSOL GUI (optional). new_tag: new programmatic tag (optional; must be unique). model: model name/tag (None = current model). |
| phys_featuresB | Return the nested feature tree of a physics interface. Every node has tag, label, COMSOL type, active state, entity dimension,
selected entities / named selection. Sub-features (e.g. "Plasticity"
under the Linear Elastic Model) appear as nested Args: interface: interface tag/label/type (e.g. "ht"). include_properties: also return every property value (can be large). model: model name/tag (None = current model). |
| phys_list_featuresA | Return a flat list of all physics features (including sub-features). Nested features carry a Args: interface: interface tag/label/type (e.g. "ht"). include_properties: also return property values for every feature. model: model name/tag (None = current model). |
| phys_add_featureA | Create a physics feature (boundary condition, domain setting, ...).
Args: interface: interface tag/label/type (e.g. "ht"). feature_type: COMSOL feature type, e.g. "TemperatureBoundary", "HeatFluxBoundary", "HeatSource", "Fixed", "InletBoundary". tag: new feature tag (None = auto "prefixN"). label: optional display label. entity_dim: entity dimension (3=domains, 2=boundaries, 1=edges, 0=points in 3D; None = domain dimension of the geometry). selection: entity list (e.g. [1,2,3]), "all", or a named-selection tag. named_selection: named selection tag to assign instead of entities. all_entities: select all entities of the feature's dimension. properties: property dict, e.g. {"T0": "400[K]"}. parent: parent feature tag (or nested path "lemm1/pl1") for sub-features. model: model name/tag (None = current model). |
| phys_add_bcA | Create a boundary/domain condition through a friendly alias. Aliases map to the real COMSOL feature type and property names, and pre-set
any required switches (e.g. convection sets HeatFluxType=ConvectiveHeatFlux,
radiation sets epsilon_rad_mat=userdef). If Verified aliases by interface type: HeatTransfer: temperature(T0), heat_flux(q0_input), convection(h,Text), radiation(epsilon_rad,Tamb), heat_source(Q0), initial(Tinit), insulation; SolidMechanics: fixed, prescribed_displacement(Direction+U0 vector), roller, initial(u), and three load types: boundary_load with F/load = per-area traction [N/m^2] (ForceArea + forceReferenceArea), total_force/force = total force [N] (TotalForce + force), pressure/p = normal pressure [Pa] (FollowerPressure + pressure); pressure_load(p) = normal pressure shortcut; body_load with F/load = per-volume force [N/m^3] (ForceVolume + forceReferenceVolume) or total_force/force = total force [N]; note: on a COMSOL BoundaryLoad/BodyLoad the property "F" is only the DERIVED resultant force - it does not apply a load, so these aliases write the real input properties instead; LaminarFlow: inlet(U0in), outlet(p0), wall, symmetry, volume_force(F), initial; Electrostatics: ground, electric_potential(V0), surface_charge(rhoqs), space_charge(rhoq), zero_charge, initial(V); ConductiveMedia (electric currents): terminal(TerminalType,V0,I0), ground, electric_potential(V0), normal_current_density(nJ), initial(V2); PressureAcoustics: sound_hard, sound_soft, normal_velocity(nvel), impedance(Zn), pressure(p0), initial(p2); ElectromagneticWavesFrequencyDomain: pec, pmc, port(PortName,Pin), scattering(IncidentField), initial(E); DilutedSpecies: concentration(c0), inflow(c0), outflow, no_flux, reactions(R_c), initial(initc). Args: interface: interface tag/label/type (e.g. "ht"). bc: alias name (e.g. "temperature") or a raw COMSOL feature type. selection: entity list, "all", or a named-selection tag. named_selection: named selection tag to assign. all_entities: select all entities of the condition's dimension. properties: property values using real COMSOL names or documented aliases, e.g. {"T0": "400[K]"} or {"T": "400[K]"}. tag: new feature tag (None = auto). label: optional display label. entity_dim: override the entity dimension (3=domains, 2=boundaries). model: model name/tag (None = current model). |
| phys_set_propertyA | Set one property on a physics feature (e.g. T0 of a temperature BC). Invalid property names return the available properties and close matches. Expressions use COMSOL unit syntax: "400[K]", "1e4[W/m^2]". Args: interface: interface tag/label/type (e.g. "ht"). feature: feature tag or label (e.g. "temp1"). name: COMSOL property name (e.g. "T0", "q0_input", "h", "V0"). value: property value (string with units, number, bool or list). model: model name/tag (None = current model). |
| phys_propertiesB | Return all properties of a physics feature (values bounded). Args: interface: interface tag/label/type (e.g. "ht"). feature: feature tag/label (e.g. "temp1"); nested paths use "a/b". model: model name/tag (None = current model). |
| phys_set_selectionA | Assign entities (or a named selection / all entities) to a feature. Args:
interface: interface tag/label/type (e.g. "ht").
feature: feature tag/label (e.g. "temp1").
entities: entity numbers [1,2,3], "all", or a named-selection tag.
named: named selection tag (alternative to |
| phys_get_selectionB | Show the entity dimension and selected entities of a physics feature. Args: interface: interface tag/label/type (e.g. "ht"). feature: feature tag/label (e.g. "temp1"). model: model name/tag (None = current model). |
| phys_remove_featureA | Remove a physics feature (COMSOL default/required features cannot be removed). Args: interface: interface tag/label/type (e.g. "ht"). feature: feature tag/label (e.g. "temp1"). model: model name/tag (None = current model). |
| phys_toggle_featureA | Enable/disable a physics feature (None = flip its current state). Args: interface: interface tag/label/type (e.g. "ht"). feature: feature tag/label (e.g. "temp1"). active: True=enable, False=disable, None=toggle. model: model name/tag (None = current model). |
| phys_interface_propertiesA | List interface-level property groups and their properties. These are the settings shown directly on the physics-interface node in COMSOL (e.g. "EquationForm" / advanced settings, "PhysicalModelProperty" / physical model, "ShapeProperty" / shape functions), not feature properties. Args: interface: interface tag/label/type (e.g. "ht"). include_values: include current values (values are truncated). model: model name/tag (None = current model). |
| phys_set_interface_propertyA | Set one interface-level property (inside a Physics.prop() group). Args: interface: interface tag/label/type (e.g. "ht"). name: property name, e.g. "form" (EquationForm) or "Tref" (PhysicalModelProperty). value: new value, e.g. "Automatic" or "300[K]". group: property group tag/label; when omitted the property is searched across all groups and must be unambiguous. model: model name/tag (None = current model). |
| phys_feature_typesA | List the feature types COMSOL allows inside a physics interface. Uses the shipped COMSOL 6.4 catalog (no COMSOL connection needed), with tag prefix and description for each type. Args: interface: interface type, tag prefix or description (e.g. "HeatTransfer" or "ht"). dimension: restrict to a space dimension: 3, "2D", "2daxi", "S3D", ... (None = union over all dimensions). query: optional case-insensitive substring filter on type/description. limit: maximum number of feature types returned (default 500). |
| phys_interfaces_catalogA | Search the catalog of physics interface types available in COMSOL 6.4. Args: dimension: restrict to a space dimension: 3, "2D", "2daxi", ... or None. query: case-insensitive substring filter on type/description (e.g. "heat", "flow", "acoustic"). limit: maximum number of interfaces returned (default 200). |
| multiphysics_listB | List multiphysics couplings (e.g. ThermalExpansion, NonIsothermalFlow). Args: model: model name/tag (None = current model). |
| multiphysics_addA | Add a multiphysics coupling between existing physics interfaces. Common types (live-verified): ThermalExpansion (heat+solid), NonIsothermalFlow (heat+flow), ElectromagneticHeating (heat+EM waves), AcousticStructureBoundary (acoustics+structure), FluidStructureInteractionBC (flow+structure). The coupling type is attempted on COMSOL; unknown types return close matches. Args: type: coupling type, e.g. "ThermalExpansion", "NonIsothermalFlow". tag: coupling tag (None = conventional prefix + number, e.g. "te1"). label: optional display label. geom: geometry tag the coupling operates on (None = first geometry). entity_dim: entity dimension for boundary couplings (2 in 3D, 1 in 2D); None tries the 3-argument form first. component: component tag (None = first component). model: model name/tag (None = current model). |
| multiphysics_removeB | Remove a multiphysics coupling. Args: coupling: coupling tag or label (e.g. "te1"). model: model name/tag (None = current model). |
| multiphysics_get_featuresB | List multiphysics couplings with their sub-features. Args: coupling: coupling tag/label (None = all couplings). include_properties: include each coupling's property values. model: model name/tag (None = current model). |
| multiphysics_add_featureB | Create a sub-feature inside a multiphysics coupling. Args: coupling: coupling tag/label (e.g. "te1"). feature_type: COMSOL sub-feature type valid for that coupling. tag: sub-feature tag (None = auto). label: optional display label. entity_dim: entity dimension (None = COMSOL default). model: model name/tag (None = current model). |
| multiphysics_propertiesB | Return all properties of a multiphysics coupling (values bounded). Args: coupling: coupling tag/label (e.g. "te1"). model: model name/tag (None = current model). |
| multiphysics_set_propertyB | Set one property on a multiphysics coupling. Args: coupling: coupling tag/label (e.g. "te1"). name: property name (e.g. "InputType", "Heat_physics", "Solid_physics"). value: new value, e.g. "SecantCoefficient" or "ht". model: model name/tag (None = current model). |
| plot_typesA | List valid plot group types, plot feature types and quick-plot aliases. Use this before plot_group_create / plot_add_feature to pick valid type
strings for COMSOL 6.4. Attribute features (Deform, Height, Filter,
Transparency) must be added with |
| plot_listB | List the plot groups (result features) in a model. Args: model: model name/tag (None = current model). |
| plot_featuresA | List the plot features (and their attributes) of one plot group. Args:
plotgroup: plot group tag, e.g. |
| plot_group_createA | Create an empty plot group at the results root. Args:
plotgroup_type: Example: plot_group_create("PlotGroup3D", tag="pgT", dataset="dset1", title="Temperature (K)") |
| plot_add_featureA | Add a plot feature (or an attribute) to a plot group. Args:
plotgroup: target plot group tag (see plot_list).
feature_type: COMSOL plot type, e.g. Example: plot_add_feature("pgT", "Surface", expr="T", properties={"colortable": "ThermalLight"}) |
| plot_set_propertiesA | Set properties on a plot group or on one of its plot features. Invalid property names return the complete list of available properties read live from the node (use plot_properties to inspect first). Args:
plotgroup: plot group tag.
properties: mapping of COMSOL property -> value, e.g.
Example: plot_set_properties("pg1", {"showlegends": "off", "title": "T [K]"}) plot_set_properties("pg1", {"colortable": "ThermalLight"}, feature="surf1") |
| plot_propertiesA | Read all properties of a plot group or plot feature (JSON). Args: plotgroup: plot group tag. feature: plot feature tag or nested path; omit for the group itself. model: model name/tag (None = current model). |
| plot_removeA | Remove a plot group entirely, or one plot feature/attribute. Args: plotgroup: plot group tag. feature: feature tag or nested path to remove; omit to remove the whole plot group. model: model name/tag (None = current model). |
| plot_attach_datasetA | Point an existing plot group at another dataset. Useful to re-render the same plot for a cut plane ( Args:
plotgroup: plot group tag.
dataset: dataset tag, e.g. |
| plot_runB | Render a plot group (or a single plot feature) and report timing. Rendering is needed before exporting images (though plot_export_image also triggers rendering automatically when COMSOL requires it). Args: plotgroup: plot group tag. feature: optional plot feature tag to render alone. model: model name/tag (None = current model). |
| plot_export_imageA | Render plot group(s) and export image file(s), validated with Pillow. Exports COMSOL's Args:
plotgroup: single plot group tag to export (e.g. Returns:
For one group: |
| plot_quickA | One-call plot: create group + feature, render, export a validated image. Args:
expr: COMSOL expression to plot, e.g. Returns:
Example: plot_quick("T", plot_type="surface", colortable="ThermalLight", title="Temperature") |
| plot_export_plot_dataA | Export the raw rendered data vectors of a plot feature to CSV. COMSOL returns the data it renders per feature: for a Args: plotgroup: plot group tag to read data from. feature: plot feature tag (defaults to the first feature). path: output CSV path (auto under artifact root when omitted). max_points: cap values written per column. model: model name/tag (None = current model). Returns:
|
| dataset_listB | List all result datasets (tag, label, COMSOL type, source dataset/solution). Args: model: model name/tag (None = current model). |
| dataset_createA | Create a result dataset (data source for plots/evaluations/exports). Common types: Solution, CutPlane, CutLine3D, CutPoint3D, Grid3D, Surface,
Volume, Embed2D, Mirror3D, Extrude2D, Revolve2D, Sector3D, Filter, Join,
TimeAverage, Integral, Average, Maximum, Minimum.
Full list: Args: type: dataset type string, e.g. "CutPlane". tag: dataset tag (None = auto, e.g. cpl1). Must be unique. source: source dataset tag for derived datasets (e.g. "dset1"); for type="Solution" this is the solution tag (e.g. "sol1"). properties: additional properties, e.g. {"quickplane": "xy", "quickz": "0.01"}. Plane coordinates use quickx/quicky/quickz. model: model name/tag (None = current model). |
| dataset_infoA | Describe one dataset: type, label, source solution, and all properties. Args: tag: dataset tag, e.g. "dset1" or "cpl1" (see dataset_list). include_properties: include the full COMSOL property dictionary. model: model name/tag (None = current model). |
| dataset_set_propertyA | Set one property on an existing dataset (generic escape hatch). Args: tag: dataset tag (e.g. "cpl1"). name: COMSOL property name (dataset_info lists valid ones), e.g. "quickz". value: property value ("0.01", 0.01, ["0","1"], ...). model: model name/tag (None = current model). |
| dataset_removeA | Remove a result dataset by tag (does not affect the solution data). Args: tag: dataset tag to remove, e.g. "cpl1" (see dataset_list). model: model name/tag (None = current model). |
| result_numerical_listB | List derived-value ("Numerical") evaluation features in the model. Args: model: model name/tag (None = current model). |
| result_createA | Create a raw derived-value feature (advanced; low-level escape hatch). Prefer result_evaluate / result_integrate / result_average / result_minmax
for normal use. Args: type: numerical feature type. tag: feature tag (None = auto "evN"). dataset: dataset tag to evaluate on (None = COMSOL default). expressions: COMSOL result expressions, e.g. ["T", "ht.ntflux"]. entities: entity selection (list of ints), or "all". named_selection: name of a model selection to use instead of entities. solnum: 1-based solution number(s) to evaluate (None = all). table: table tag to store the result in (result_table_create). properties: raw COMSOL properties to set (dataset_info/tree_properties). run: run the feature immediately (default False). model: model name/tag (None = current model). |
| result_removeC | Remove an evaluation/table/export/dataset node by tag. Args: tag: node tag (e.g. "ev1", "tbl1", "data1", "cpl1"). kind: "numerical" (derived values), "table", "export" or "dataset". model: model name/tag (None = current model). |
| result_evaluateA | Generic result evaluation with an explicit evaluation type. One tool for all COMSOL 6.4 evaluation types. Aliases: global, point/interp (arbitrary coordinates), eval_point (geometry points), field/domain (whole solution field), int_volume, int_surface, int_line, av_volume, av_surface, av_line, max_volume, max_surface, max_line, min_volume, min_surface, min_line, stddev_*, measure_volume, measure_surface, measure_line, measure_distance, mass/mass_properties, api_global. Units are reported per expression; complex results include imaginary
rows. Results are capped at Args: eval_type: alias or exact numerical type (e.g. "av_volume", "EvalGlobal"). expressions: COMSOL result expressions, e.g. ["T"] or ["ht.ntflux"]. Required except for the Measure* types. dataset: dataset tag (None = feature default, usually the first solution dataset). For "field" use a solution dataset; for "point" use a solution dataset and pass coords. entities: entity numbers of the feature dimension (3=domains, 2=boundaries, 1=edges, 0=points in 3D), or "all" (default for volume/surface/line integrals/averages/min/max/measures). named_selection: named selection tag instead of entities. coords: for "point"/"interp": [[x, y, z], ...] evaluation coordinates. solnum: 1-based solution number(s), e.g. [2] or [1,2,3] (None = all). table: table tag to store the result in (adds "table" payload). properties: extra raw COMSOL properties. model: model name/tag (None = current model). |
| result_eval_globalA | Evaluate GLOBAL-scope expressions (parameters, global variables). EvalGlobal works in the model's global scope: parameters, global variables/expressions, global ODE variables. Field variables (e.g. "T" of a 3D heat model) are NOT defined in global scope -use result_eval_point / result_integrate / result_average / result_minmax for fields. Example: expressions=["T0", "2*T0"] after setting parameter T0=400[K] returns [400.0, 800.0] with units [K, K]. Args: expressions: global expressions, e.g. ["T0", "2*T0"]. dataset: dataset tag (None = default solution dataset). solnum: 1-based solution number(s) (None = all). table: table tag to store the result in. model: model name/tag (None = current model). |
| result_eval_pointA | Evaluate expressions at arbitrary coordinates (or at geometry points). Coordinate evaluation uses the API-only Args: expressions: expressions to evaluate, e.g. ["T"]. coords: [[x, y, z], ...] coordinates (3 components for 3D, 2 for 2D). Evaluated with Interp; results include the coordinates. dataset: dataset tag; for coords usually the solution dataset (e.g. "dset1", or "dset2" for a transient solution at all times). entities: geometry point numbers for EvalPoint (e.g. [1, 2]); use instead of coords. Point entities have dimension 0. named_selection: named point selection for EvalPoint. solnum: 1-based solution number(s) (None = all solutions). model: model name/tag (None = current model). |
| result_eval_volumeA | Evaluate a field on all mesh nodes of a solution dataset (pointwise). API-only Args: expressions: expressions to evaluate, e.g. ["T"]. dataset: dataset tag that maps directly to a solution ("dset1"). max_points: cap on returned points (default 200). solnum: 1-based solution number(s) (None = all). model: model name/tag (None = current model). |
| result_eval_surfaceA | Evaluate a field on a surface/cut-plane dataset (pointwise values on it). Uses the API-only Args: expressions: expressions to evaluate, e.g. ["T"]. dataset: CutPlane/Surface dataset tag (e.g. "cpl1"). solnum: 1-based solution number(s) (None = all). max_points: cap on returned points (default 200). model: model name/tag (None = current model). |
| result_eval_lineA | Evaluate on a line: pointwise along a CutLine dataset or line integrals.
Args: expressions: expressions, e.g. ["T"]. dataset: CutLine3D dataset tag for pointwise sampling along the line. entities: line entity numbers (None = all line entities with kind op). named_selection: named line selection. kind: "integral" (default for entities is average), "average", "max", "min", "stddev", "measure". solnum: 1-based solution number(s) (None = all). max_points: cap on returned points for dataset sampling. model: model name/tag (None = current model). |
| result_integrateA | Integrate expressions over domains, boundaries or edges. Dimension-aware COMSOL types (verified): 3D -> IntVolume (domains) / IntSurface (boundaries) / IntLine (edges); 2D -> IntSurface (domains) / IntLine (boundaries). Physical unit includes the integration measure, e.g. "m^3K" for T over a 3D volume or "m^2K" over a 2D domain. Args: expressions: expressions to integrate, e.g. ["T"]. kind: "volume"/"domain" (domains), "surface"/"boundary" (boundaries) or "line"/"edge" (edges; 2D: boundaries). dataset: dataset tag (None = default solution dataset). entities: entity numbers of the resolved dimension (3=domains, 2=boundaries, 1=edges in 3D; 2D: 2=domains, 1=boundaries); default = all entities of that dimension. named_selection: named selection instead of entities. solnum: 1-based solution number(s) (None = all). table: table tag to store the result in. model: model name/tag (None = current model). |
| result_averageA | Average expressions over domains, boundaries or edges. Dimension-aware COMSOL types (verified): 3D -> AvVolume / AvSurface / AvLine; 2D -> AvSurface (domains) / AvLine (boundaries). Args: expressions: expressions to average, e.g. ["T"]. kind: "volume"/"domain", "surface"/"boundary" or "line"/"edge" (2D: boundaries). dataset: dataset tag (None = default solution dataset). entities: entity numbers of the resolved dimension (default = all). named_selection: named selection instead of entities. solnum: 1-based solution number(s) (None = all). table: table tag to store the result in. model: model name/tag (None = current model). |
| result_minmaxA | Maximum and/or minimum of expressions over domains/boundaries/edges. Dimension-aware COMSOL types (verified): 3D -> MaxVolume/MaxSurface/ MaxLine (Min* alike); 2D -> MaxSurface (domains) / MaxLine (boundaries). Args: expressions: expressions, e.g. ["T"]. kind: "volume"/"domain", "surface"/"boundary" or "line"/"edge" (2D: boundaries). mode: "both" (default), "max" or "min". dataset: dataset tag (None = default solution dataset). entities: entity numbers of the resolved dimension (default = all). named_selection: named selection instead of entities. solnum: 1-based solution number(s) (None = all). model: model name/tag (None = current model). |
| result_mass_propertiesA | Volume, mass (and center-of-mass unit) of selected domains. Uses the COMSOL Args: dataset: dataset tag (None = default solution dataset). entities: domain numbers (default = all domains). named_selection: named domain selection instead of entities. expressions: optional explicit 3 expressions (volume, mass, arm); default is COMSOL's density-based set. Must have length 3. solnum: 1-based solution number(s) (None = all). table: table tag to store the result in. model: model name/tag (None = current model). |
| result_measureA | Measure volume / area / line length / distance between two points. Dimension-aware COMSOL types (verified): 3D -> MeasureVolume (domains) / MeasureSurface (boundaries) / MeasureLine (edges); 2D -> MeasureSurface (domain area) / MeasureLine (boundary length). "distance" always uses MeasureDistance with exactly two point entities. Args: kind: "volume"/"domain", "surface"/"boundary", "line"/"edge" or "distance" ("distance" needs exactly two point entities). dataset: dataset tag (None = default solution dataset). entities: entity numbers; for "distance" exactly two point entities. named_selection: named selection instead of entities. solnum: 1-based solution number(s) (None = all). table: table tag to store the result in. model: model name/tag (None = current model). |
| result_stddevA | Standard deviation of expressions over domains/boundaries/edges. Dimension-aware COMSOL types (verified): 3D -> StdDevVolume / StdDevSurface / StdDevLine; 2D -> StdDevSurface (domains) / StdDevLine (boundaries). Args: expressions: expressions, e.g. ["T"]. kind: "volume"/"domain", "surface"/"boundary" or "line"/"edge" (2D: boundaries). dataset: dataset tag (None = default solution dataset). entities: entity numbers of the resolved dimension (default = all). named_selection: named selection instead of entities. solnum: 1-based solution number(s) (None = all). model: model name/tag (None = current model). |
| table_listA | List result tables (tag, label, rows, columns). Args: model: model name/tag (None = current model). |
| result_table_createA | Create a result table, optionally with column headers and numeric rows. Tables are normally filled by evaluation features: pass the table tag to
result_integrate/result_average/result_minmax ( Args: tag: table tag (None = auto "tblN"). headers: column headers, e.g. ["t", "T_avg"] (units may be appended in parentheses like "T (K)"). rows: numeric rows, e.g. [[0, 293.15], [1, 310.2]]. model: model name/tag (None = current model). |
| result_table_readA | Read a result table: column headers, real (and imaginary) rows. Args: tag: table tag (None = use the most recently created table). max_rows: cap on returned rows (default 100). model: model name/tag (None = current model). |
| result_export_dataA | Export expression data to a CSV/TXT file (COMSOL Data export). Writes mesh-node/dataset-point values with a COMSOL comment header that
contains the units (e.g. Args: expressions: expressions to export, e.g. ["T"]. dataset: dataset tag (None = default solution dataset). CutPlane / CutPoint datasets work and export their points. filename: output path; relative paths go to the artifact workspace. Extension .csv or .txt (default .csv). coords: optional explicit coordinates -> creates a temporary CutPoint3D dataset and exports the values at those points. solnum: 1-based solution number(s) (None = all); for multi-solution datasets every selected solution becomes a block in the file. model: model name/tag (None = current model). |
| result_solution_valuesB | Return solution/time/parameter values behind result datasets. For each dataset the referenced solution is resolved and its stored
parameter values are returned: time values for transient studies
( Args: dataset: dataset tag to inspect (None = all datasets). model: model name/tag (None = current model). |
| result_eval_all_solutionsA | Evaluate an expression for every solution/time in a dataset. The evaluation matrix columns are the solutions of the dataset (e.g. a
transient dataset with N stored times) and the response adds a compact
Args: expressions: expressions, e.g. ["T"]. eval_type: alias like "average", "integral", "global", "max", "min" or an exact numerical type. kind: dimension for the alias: "volume"/"domain", "surface"/"boundary" or "line" (2D: boundaries). dataset: dataset containing all solutions (e.g. "dset2" after a transient solve). None = default dataset. entities: entity numbers of that dimension (default = all). named_selection: named selection instead of entities. model: model name/tag (None = current model). |
| result_available_expressionsA | Check which candidate expressions are valid, with their physical units. Each candidate is evaluated with the API-only Args: candidates: candidate expressions, e.g. ["T", "ht.ntflux", "u", "1+"]. dataset: dataset tag (None = first solution dataset). coords: point [[x, y, z]] used for the probe (default = geometry centre). model: model name/tag (None = current model). |
| session_startA | Start COMSOL and connect (client-server mode by default). Args: cores: number of solver cores (None/0 = all available cores). version: COMSOL version string such as "6.4" (None = newest installed). port: server port (0/None = pick a free port automatically). standalone: true = run COMSOL in-process (faster, less isolated). Returns session status including version, licensed modules and loaded models. |
| session_connectB | Connect to an already running COMSOL server ( Args: port: TCP port the COMSOL server listens on (default COMSOL port is 2036). host: hostname or IP of the server (default localhost). |
| session_statusA | Return COMSOL session state, version, licensed modules and loaded models. |
| session_stopB | Disconnect the client and shut down the managed COMSOL server. |
| session_restartA | Restart the COMSOL server process and reconnect (recovery / clean state). All models are unloaded by COMSOL; save them with model_save first and reload afterwards with model_load. |
| session_killA | Force-kill the managed COMSOL server process (escape hatch). Use when a solve hangs and |
| job_listA | List background jobs (solves, animations, batch evaluations). Args: status: filter by pending | running | success | error | cancelled. limit: maximum number of jobs to return (newest first). |
| job_statusC | Return the status / progress of a background job. |
| job_cancelB | Request cancellation of a background job. Cancellation is cooperative: it stops multi-step jobs between steps and is ignored (documented) by a single monolithic COMSOL solve. |
| job_waitB | Wait up to |
| study_listA | List every study in a model with its steps, options, solutions and timings. Args: model: model name/tag (None = current model). |
| study_createA | Create an empty study, optionally with study steps. Args:
study: tag for the new study (None = automatic, e.g. "std1").
steps: list of step specs, each
Example: steps=[{"tag": "time", "type": "Transient", "properties": {"tlist": "range(0,0.1,1)"}}, {"tag": "stat", "type": "Stationary"}] |
| study_add_stepA | Add a study step to an existing study (any COMSOL 6.4 study-step type). Args: study: study tag. step_type: COMSOL study-step type, e.g. "Stationary", "Transient", "Eigenfrequency", "Frequency", "ModeAnalysis", "Parametric", "MaterialSweep", "BatchSweep", "Sensitivity", "Optimization". tag: step tag (None = automatic, e.g. "stat", "time", "eig"). label: optional display label. properties: step properties to set, e.g. {"tlist": "range(0,0.1,1)"} for Transient, {"neigs": 6} for Eigenfrequency, {"plist": ["10", "20", "30"]} for Frequency. model: model name/tag (None = current model). |
| study_add_sweepA | Add a sweep study step (parametric / material / batch / sensitivity / ...). The sweep step is inserted before the solving step; if Args:
pname: parameter name(s) to sweep, e.g. "k" or ["k", "Q0"].
plist: parameter values: list like ["1", "2", "3"], a comma string
"1,2,3", a Example: study_add_sweep(pname="k", plist=["1", "5", "10"], punit="W/(m*K)", study="std_parametric") |
| study_set_propertyA | Set properties on a study step (time list, frequencies, eigenvalues, ...). Args: study: study tag. step: study-step tag (see study_steps). properties: property name -> value, e.g. {"tlist": "range(0,0.05,0.5)"} (Transient time list; string expressions are accepted and expanded by COMSOL), {"plist": ["10", "20", "30"], "punit": ["Hz"]} (frequency), {"neigs": 6, "shift": "10[Hz]"} (eigenfrequency), {"pname": ["k"], "plist": ["1", "5", "10"]} (parametric sweep). model: model name/tag (None = current model). Property values: strings for expressions, numbers for numeric fields,
lists of strings for string arrays. Read current values with
|
| study_set_optionsB | Configure study-level output options (default plots, convergence, storage). Args: study: study tag (None = the only study in the model). gen_plots: generate default plots after solving. gen_conv: store convergence plots. store_solution: store the solution in the study node. store_complete_history: record the complete solver history. gen_intermediate_plots: generate intermediate plots during solving. plot_undefined_values: plot undefined values. model: model name/tag (None = current model). |
| study_propertiesB | Detailed description of one study: steps, options, solutions, timings. Args: study: study tag (None = the only study in the model). model: model name/tag (None = current model). |
| study_stepsA | List the steps of a study with their type, active state and key properties. Args: study: study tag (None = the only study in the model). include_properties: include the curated key properties (tlist, pname, plist, neigs, shift, plot, stol, ...). property_names: explicit list of property names to include instead. include_all_properties: return all step properties (large, ~200 each). model: model name/tag (None = current model). |
| study_solveA | Solve a study synchronously and report timings, solutions and messages. Long solves block the COMSOL worker; use Args:
study: study tag (None = the only study in the model).
generate_plots: switch on the "Plot" option of every study step so
that default plot groups are created (otherwise the client API
creates none).
run_no_gen: use Returns: study, model, elapsed_s, solution_tags, new_datasets, new_plots, solution_stats (type/size/DoFs/solution counts), last_computation_time/ date/version, warnings and errors. |
| study_solve_asyncA | Start a background solve job and return immediately with a Poll progress with Cancellation is cooperative ( Args:
study: one study tag to solve (None = all studies of the model).
studies: list of study tags to solve sequentially (alternative to
Example: job = study_solve_async(study="std_time") # then: study_solve_wait(job["job_id"], timeout_s=180) |
| study_solve_waitA | Wait for a background solve job (see study_solve_async) and return it. Args: job_id: job id returned by study_solve_async. timeout_s: maximum seconds to wait (default 120; use several polls for longer solves). Returns the job status/progress plus the solve result and artifacts when finished. Does not consume the COMSOL worker thread. |
| study_logA | Computation timing / solver messages / solution statistics for a study. COMSOL 6.4's client API does not expose the textual solver log; this returns the machine-readable substitute: last computation time/date/ version, expected computation time, per-solver-sequence warning/error/ information messages, stored solution numbers/levels, and model problems. Args: study: study tag (None = the only study in the model). model: model name/tag (None = current model). |
| study_removeB | Remove a study from the model tree (its solver sequences are kept). Args: study: study tag. model: model name/tag (None = current model). |
| study_duplicateA | Duplicate a study node (best effort - unsupported by COMSOL 6.4 API). Args: study: tag of the study to duplicate. new_tag: tag for the copy (None = automatic "_copy"). model: model name/tag (None = current model). Note: the COMSOL 6.4 client API rejects Study.duplicate()/copy() with
"unsupported operation"; this tool then returns an actionable error and
suggests |
| study_enable_physicsA | Enable/disable physics interfaces for a study step ("Solve for" list). Args: study: study tag. step: study-step tag (None = the first step). physics: physics tags or paths, e.g. ["ht"] or ["/physics/ht"] (None = every physics interface in the model). enabled: true = solve for the physics, false = deactivate it. model: model name/tag (None = current model). |
| study_stationaryB | Create a Stationary study and (by default) solve it immediately. Args: study: study tag (None = automatic "std_stat1"). properties: Stationary step properties (e.g. {"stol": 1e-4, "plot": "on"}). solve: run the study after creating it (default true). generate_plots: generate default plot groups. label: optional display label. model: model name/tag (None = current model). |
| study_transientA | Create a time-dependent study with a time list and (by default) solve it. Args: times: COMSOL time list expression, e.g. "range(0,0.1,1)" (0 s to 1 s in 0.1 s steps) or "range(0,0.05,0.5)". A list of values such as [0, 0.1, 0.2] is also accepted. study: study tag (None = automatic "std_time1"). properties: extra Transient step properties (e.g. {"tunit": "s"}). solve: run the study after creating it (default true). generate_plots: generate default plot groups. label: optional display label. model: model name/tag (None = current model). |
| study_eigenfrequencyB | Create an Eigenfrequency study (n eigenvalues) and (by default) solve it. Args: neigs: number of eigenvalues/modes to compute (default 6). shift: eigenvalue shift expression, e.g. "0" or "10[Hz]" (None = COMSOL default). eigmethod: eigenvalue solver method, e.g. "manual" or "iterative". study: study tag (None = automatic "std_eig1"). properties: extra Eigenfrequency step properties. solve: run the study after creating it (default true). generate_plots: generate default plot groups. label: optional display label. model: model name/tag (None = current model). |
| study_frequencyA | Create a Frequency-domain (harmonic) study and (by default) solve it. Args: frequencies: frequency list: a "range(10,10,100)" expression (10 Hz to 100 Hz in 10 Hz steps), a list ["10", "20", "50"], or a comma string "10,20,50". punit: frequency unit, e.g. "Hz" (default COMSOL unit). study: study tag (None = automatic "std_freq1"). properties: extra Frequency step properties. solve: run the study after creating it (default true). generate_plots: generate default plot groups. label: optional display label. model: model name/tag (None = current model). |
| study_parametricA | Create a parameter sweep study (Parametric step + solver) and solve it. Args: pname: parameter name(s) to sweep, e.g. "k" or ["k", "Q0"]. plist: parameter values, e.g. ["1", "5", "10"], "1,5,10" or "range(1,1,10)". Values may include units ("1[W/(mK)]"). punit: optional unit(s) for the values, e.g. "W/(mK)". sweep_type: "Parametric" (default), "MaterialSweep", "BatchSweep", ... study: study tag (None = automatic "std_param1"). solver_step_type: physical solver step appended after the sweep (default "Stationary"; use "Transient" for transient sweeps). solver_step_properties: properties for that solver step. solve: run the study after creating it (default true). generate_plots: generate default plot groups. label: optional display label. model: model name/tag (None = current model). |
| solver_sequence_listB | List the solver sequences ("Solver Configurations") of the model. Args: model: model name/tag (None = current model). |
| solver_sequence_createA | Create a solver sequence for a study (automatic or explicit/manual). Args: study: study tag (None = the only study in the model). mode: "auto" (Study.createAutoSequences; COMSOL default settings) or "manual" (explicit StudyStep + Variables + solver feature sequence). sequence_tag: tag for a manual sequence (None = automatic "sol1", ...). sequence_type: for mode="auto": "all" (default), "sol" or "jobs". solver_feature_types: for mode="manual": extra feature types to add inside each solver feature, e.g. ["Direct", "FullyCoupled"]. attach: attach the manual sequence to the study (default true). model: model name/tag (None = current model). |
| solver_sequence_removeB | Remove a solver sequence (solution object) from the model. Args: sequence: solver sequence tag (e.g. "sol1"). model: model name/tag (None = current model). |
| solver_feature_listA | List the solver-configuration feature tree of a solver sequence. Args: sequence: solver sequence tag (None = the only one). parent: optional feature path to start from, e.g. "s1". depth: recursion depth for nested features (default 2). model: model name/tag (None = current model). |
| solver_feature_addA | Add a solver-configuration feature to a solver sequence. Args: sequence: solver sequence tag (None = the only one). feature_type: COMSOL solver feature type: "FullyCoupled", "Segregated", "Direct", "Iterative", "Multigrid", "SOR", "Jacobi", "IncompleteLU", "Stationary", "Time", "Eigenvalue", "StudyStep", "Variables", ... (catalog_types("solver")). tag: feature tag (None = automatic from the type, e.g. "fc1"). parent: parent feature path (None = the sequence root). Linear solvers/coupling features usually belong inside a solver feature, e.g. parent="s1". properties: feature properties to set, e.g. {"linsolver": "pardiso"} for a Direct feature. model: model name/tag (None = current model). |
| solver_feature_setB | Set properties of a solver-configuration feature. Args: sequence: solver sequence tag (None = the only one). feature: feature path inside the sequence, e.g. "s1" or "s1/fc1". properties: property name -> value, e.g. {"linsolver": "pardiso"}, {"maxiter": 200}, {"stol": 1e-4}. model: model name/tag (None = current model). |
| solver_feature_propertiesA | Show type, messages and properties of a solver-configuration feature. Args: sequence: solver sequence tag (None = the only one). feature: feature path inside the sequence, e.g. "s1", "s1/fc1", "v1". include_properties: include the full property dict (default true). model: model name/tag (None = current model). |
| solver_feature_removeA | Remove a solver-configuration feature (COMSOL 6.4 limitation). Args: sequence: solver sequence tag (None = the only one). feature: feature path inside the sequence, e.g. "s1/d2". model: model name/tag (None = current model). Note: COMSOL 6.4's client API refuses to delete solver-configuration features ("cannot remove feature"); this tool reports that as a documented limitation. To restructure a solver sequence, remove and recreate it (solver_sequence_remove + solver_sequence_create). |
| solver_runB | Run a solver sequence (runAll / runFrom / runFromTo). Args: sequence: solver sequence tag (None = the only one). mode: "all" (default, SolverSequence.runAll), "from" (runFrom), or "from_to" (runFromTo). from_feature: feature tag to start from (mode="from"/"from_to"), e.g. "st1" or "s1". to_feature: feature tag to stop at (mode="from_to"). generate_plots: ask runAll to create plots (where supported). model: model name/tag (None = current model). |
| solver_configureA | Generic solver-configuration access: list features, add one, set properties. One tool for all low-level solver edits:
Args:
sequence: solver sequence tag (None = the only one).
feature: existing feature path to edit, e.g. "s1/d2".
properties: properties to set on |
| solution_listA | List stored solutions with type, DoFs, solution counts, datasets, messages. Args: model: model name/tag (None = current model). |
| solution_infoA | Detailed information about one stored solution. Includes: solution type (Stationary/Time/Parametric/Eigenfrequency/...), solver-sequence tag/type, attached study, storage size, DoF count, dependent fields and their DoFs, solution loop levels (t, k, lambda), solution numbers, parameter values, result datasets that use it, and solver warning/error messages. Args: solution: solution tag (e.g. "sol1"; None = the only solution). model: model name/tag (None = current model). |
| solution_selectB | Point a result dataset at a stored solution (dataset "solution" property). Args: solution: solution tag (e.g. "sol1"). dataset: result dataset tag (e.g. "dset1"; None = the only dataset). model: model name/tag (None = current model). |
| solution_removeC | Remove a stored solution (solver sequence) from the model. Args: solution: solution tag (e.g. "sol1"). model: model name/tag (None = current model). |
| tree_childrenA | List the child nodes of a model-tree node (groups, features, properties). Args: path: node path such as "physics/ht" or "geometries/geom1/blk1". Empty string lists the model root groups. model: model name/tag (None = current model). |
| tree_infoB | Show a node's tag, label, feature type, active state and selection. Args: path: model-tree path (e.g. "physics/ht/temp1"). model: model name/tag (None = current model). include_properties: also return all property values (can be large). include_children: also return child nodes. |
| tree_propertiesC | Return all settable property names and values of a node. |
| tree_get_propertyC | Read one property from a node. |
| tree_set_propertyB | Set one property on a node.
|
| tree_set_propertiesC | Set multiple properties on one node in a single call. |
| tree_createB | Create a child feature under a container node (generic escape hatch). Examples: path="physics/ht", feature_type="HeatFluxBoundary", extra_args=[2]; path="functions", feature_type="Analytic"; path="plots", feature_type="PlotGroup3D". Use the catalog tools to discover valid feature types. |
| tree_removeC | Remove a feature node from the model tree. |
| tree_renameC | Rename a node (display label, not tag). |
| tree_retagC | Change a node's tag (programmatic identifier). |
| tree_toggleC | Enable/disable a feature node (None = flip). |
| tree_runC | Execute the node's run action (build geometry, generate mesh, run study, ...). |
| tree_findC | 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. |
| tree_dumpC | Dump a bounded JSON tree of part of the model tree. |
| tree_selection_getC | Show the entities / named selection assigned to a node. |
| tree_selection_setB | Assign entities to a node's selection. Args: path: feature node path (e.g. "physics/ht/temp1"). entities: list of entity numbers, a named-selection tag, or "all". Pass null/empty to clear the selection. |
| visual_view_imageA | Display an exported COMSOL image inline (PNG/JPEG/BMP/GIF/WebP). Use the path returned by plot_export_image / plot_quick / export tools. Returns the image itself as MCP image content plus a short text summary. Args: path: absolute path to the image file. max_width: downscale to this pixel width to keep payloads small (0 = original). |
| visual_view_animationA | Display sampled frames of a COMSOL animation (GIF/MP4/AVI/WebM) as a filmstrip. Returns up to Args: path: absolute path to the GIF/MP4/AVI/WebM file. frames: number of frames to sample (1-12). max_width: downscale each sampled frame to this width. |
| comsol_capabilitiesA | Server capabilities: session state, licensed modules, catalogs, settings. Call this first to learn what is available without starting COMSOL. |
| health_checkA | Check Python packages, COMSOL installation, license and workspace readiness. |
| catalog_physics_interfacesB | List COMSOL physics interface types (932 available in COMSOL 6.4). Args: dimension: geometry dimension filter: "3", "2", "1", "2DAxi", "Global". query: substring filter on type name or description (e.g. "heat", "electro"). limit: maximum number of results. |
| catalog_physics_featuresA | List the feature types (boundary/domain conditions) allowed in a physics interface. Args: interface: interface type name, e.g. "HeatTransfer", "SolidMechanics", "LaminarFlow", "Electrostatics", "PressureAcoustics". dimension: restrict to a dimension ("3", "2", ...) when ambiguous. query: substring filter (e.g. "flux", "inlet", "fixed"). |
| catalog_geometry_featuresB | List geometry feature types available for a dimension (primitives, booleans, transforms, ...). |
| catalog_mesh_featuresC | List mesh feature types available for a dimension (FreeTet, Sweep, Size, BndLayer, ...). |
| catalog_study_featuresC | List study step and study feature types (Stationary, Transient, Eigenfrequency, ...). |
| catalog_typesC | List a registry of result/mesh/solver types. Args: category: plot | plot_features | numerical | dataset | export | function | solver | common. |
| catalog_plot_featuresB | List plot feature types (121 in COMSOL 6.4) and attribute features. Args: query: substring filter, e.g. "surface", "streamline", "arrow". kind: "plot" for primary plot features or "attribute" for attributes (Color/Deform/Height/Filter/Transparency/...). |
| server_infoA | Return server version, settings paths and workspace layout. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| COMSOL session status | Current COMSOL session state, version, licensed modules, models. |
| Loaded models | Models currently loaded in COMSOL. |
| Type catalog summary | Counts of COMSOL physics/geometry/mesh/study/results types. |
| Workspace paths | Artifact / model / scratch directories of this MCP server. |
TDQS
Scored across 274 tools
The tools are grouped by domain, but there are many overlapping or alias-like entries such as mesh_run/mesh_build, export_mesh/mesh_export, geom_export/export_geometry, and generic evaluators alongside specialized result_eval_* tools. Descriptions often clarify the intended use, but with 274 tools an agent faces a high risk of selecting a near-duplicate or lower-level escape hatch instead of the intended tool.
Nearly all tools use a consistent snake_case prefix_action or prefix_noun convention grouped by domain: geom_*, mesh_*, phys_*, mat_*, study_*, solver_*, plot_*, result_*, anim_*, and so on. A few generic names like java_eval, health_check, and server_info deviate slightly, but the overall naming pattern is highly predictable.
A 274-tool surface is far beyond what is appropriate for reliable tool selection, even for a broad domain like COMSOL Multiphysics. The set contains many aliases, specialized shortcuts, low-level escape hatches, and duplicated export paths, making the surface feel sprawling rather than well-scoped.
The toolset covers the full simulation lifecycle: model/session management, parameters, geometry, selections, materials, physics, multiphysics couplings, meshing, studies, solver configuration, results evaluation, plots, animations, exports, reports, libraries, and documentation. The few limitations noted, such as unsupported study duplication or solver-feature deletion, are COMSOL API constraints rather than missing surface coverage.