Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

anim_create

Render a simulation animation from an existing COMSOL plot group by exporting one frame per transient time step or solution and composing GIF/MP4 files with a fixed color range.

Instructions

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 t) or per solution (property solnum) with a fixed colour range, then composes the frames into a GIF and/or MP4. Works for transient heat/flow/structural studies and for parametric sweeps, eigenfrequency and frequency-domain solution sets.

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).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "plotgroup": "<plotgroup>"
    },
    "name": "anim_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
fpsNo
loopNo
modeNoauto
modelNo
timesNo
titleNo
widthNo
heightNo
outputNo
formatsNo
solnumsNo
plotgroupYes
colortableNo
max_framesNo
range_modeNocommon
color_rangeNo
keep_framesNo
frames_directoryNo
output_directoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and does a strong job: it discloses file outputs, intermediate frame handling, MP4 dependency requirements, colour-range behavior, and return contents. It stops short of clarifying overwrite behavior, runtime expectations, or filesystem edge cases, so it is not fully exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but appropriately sized for a 19-parameter tool. The purpose is front-loaded, and the Args/Returns structure makes dense parameter information easy to scan without obvious filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the high parameter count, lack of annotations, absence of an output schema, and complex multimodal output, the description is complete enough for correct invocation. It documents every parameter and the return JSON, including preview and primary artifact outputs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain all 19 parameters, and it does so with meaning, defaults, and examples for plotgroup, formats, mode, times, solnums, range_mode, color_range, output paths, and the remaining options. This adds substantial semantic value beyond the bare schema types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: it renders a simulation animation from an existing plot group via a custom pipeline. It also distinguishes the tool's role by calling it the recommended default for building animations and explaining that it exports per-time-step PNGs and composes them into GIF/MP4.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for when to use the tool, including transient, parametric sweep, eigenfrequency, and frequency-domain studies, and labels it the recommended default for animation building. It does not explicitly name when-not-to-use cases or concrete alternative siblings, so it falls short of the highest guidance score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools