Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

anim_quick

Generates GIF or MP4 animations by plotting a COMSOL expression over transient time steps or parametric solutions, with locked color ranges for consistent frames.

Instructions

One-call animation: plot an expression over time/solutions and write GIF/MP4.

Creates a plot group + plot feature for expression, renders every transient time step (or every parametric solution), locks the colour range and composes a GIF (+MP4 if requested) — the fastest path from a solved model to a real animation file.

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

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": {
      "expression": "<expression>"
    },
    "name": "anim_quick"
  }
}

Input Schema

NameRequiredDescriptionDefault
fpsNo
modeNoauto
modelNo
timesNo
titleNo
widthNo
heightNo
outputNo
datasetNo
formatsNo
solnumsNo
plot_typeNosurface2d
colortableNo
expressionYes
max_framesNo
range_modeNocommon
color_rangeNo
frames_directoryNo
output_directoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/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 burden and does substantial work: it discloses that it mutates the model by creating a plot group plus a plot feature, that it renders every time step or solution, locks the colour range, and writes GIF/MP4 artifacts, plus the imageio-ffmpeg dependency for MP4. It stops short of stating whether an existing plot group is overwritten, whether the created nodes persist in the model afterward, or what happens when the expression is invalid.

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

Conciseness4/5

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

The summary paragraph is front-loaded and states the outcome before the mechanics, and the Args/Returns blocks are scannable. It is long, but with 19 undocumented parameters nearly every line earns its place; only the trailing "Returns" prose partially duplicates information the agent could otherwise get from a structured output schema (none exists here).

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

Completeness4/5

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

For a 19-parameter, no-annotation, no-output-schema tool, this is close to complete: it covers inputs, side effects on the model, file artifacts, and the shape of the JSON return. The remaining gap is operational guidance — when to prefer this over anim_create/plot_quick, and error or overwrite behavior on failure.

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 coverage is 0%, so the description must compensate entirely, and it does: all 19 parameters are explained with defaults, accepted values, and concrete examples ("ht.T", "sqrt(u^2+v^2)", "dset1", "ThermalLight", [0,2,4,6,8,10]). It even clarifies non-obvious interactions such as color_range only applying when range_mode="manual" and output being for single-format runs.

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

Purpose4/5

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

Opens with a specific verb and resource ("plot an expression over time/solutions and write GIF/MP4") and adds a positioning clause ("the fastest path from a solved model to a real animation file") that implicitly distinguishes it from the heavier multi-step siblings like anim_create. It never names an alternative explicitly, so the differentiation is inferential rather than stated.

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

Usage Guidelines3/5

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

Usage is implied by "one-call" and "fastest path", and the mode/formats/range_mode docs hint at which scenario each serves, but there is no explicit when-to-use/when-not statement and no named alternative such as anim_create or plot_quick for the multi-step or static-plot cases. An agent must infer routing from the phrase "quick" alone.

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