Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

anim_export_frames

Export every animation frame from a COMSOL plot group as a numbered PNG sequence, then compose the frames into a GIF or MP4.

Instructions

Export a numbered PNG image sequence from a COMSOL plot group (native imageseq).

This is COMSOL's own frame exporter: it writes <base>1.png, <base>2.png, ... and is the fastest way to dump every animation frame to disk (later compose them with media_frames_to_gif / media_frames_to_mp4, or use anim_create which does both steps automatically).

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.

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_export_frames"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo
baseNo
modelNo
widthNo
heightNo
solnumNo
directoryNo
maxframesNo
plotgroupYes
sweeptypeNo
solnumtypeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/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 well: it discloses that files are written to disk, the numbering convention, that COMSOL naming is 'discovered automatically', and the exact JSON return fields. It omits overwrite behavior for pre-existing files and failure modes, which matter for a filesystem-writing tool.

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?

Front-loaded summary sentence, then structured Args and Returns blocks with zero filler. The per-parameter listing is long but justified by 11 undocumented parameters; only the parenthetical '(native imageseq)' and the redundant base-naming restatement are slightly wasteful.

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?

Covers the full parameter surface and the return shape, which compensates for the absent output schema and annotations. A mutation-to-disk tool would ideally also state overwrite semantics and whether the artifact workspace is auto-created, but nothing essential for a correct call is missing.

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 supply all meaning, and it documents every one of the 11 parameters with defaults, constraints ('maxframes >= 2, default 25'), and worked examples ('C:/out/frame' -> frame1.png). It also supplies enum values for solnumtype and sweeptype that are absent from the schema.

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?

Opens with a specific verb and resource: 'Export a numbered PNG image sequence from a COMSOL plot group (native imageseq)', and the naming pattern '<base>1.png, <base>2.png' makes the output concrete. It distinguishes itself from media_frames_to_gif / media_frames_to_mp4 and anim_create by describing itself as the raw frame-dump step those consume.

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?

Explicitly frames this as 'the fastest way to dump every animation frame to disk' and routes the agent to media_frames_to_gif / media_frames_to_mp4 for composition or anim_create for the one-step path. It does not distinguish itself from near-siblings like anim_export or anim_extract_frames, so the guidance is clear but not exhaustive.

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