Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

study_add_sweep

Adds a parametric, material, batch, or sensitivity sweep step to a COMSOL study before solving; creates the study and a stationary solver step if missing.

Instructions

Add a sweep study step (parametric / material / batch / sensitivity / ...).

The sweep step is inserted before the solving step; if study does not exist it is created. When the study has no other steps, a Stationary solver step is appended automatically.

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 range(...) expression, or a flat list for multi-parameter sweeps. Values may carry units ("1[W/(mK)]"). punit: optional unit(s) for the sweep values, e.g. "W/(mK)". sweep_type: "Parametric" (default), "MaterialSweep", "BatchSweep", "ClusterSweep", "Sensitivity", "Optimization", ... study: study tag (None = auto-create one, e.g. "std_param1"). step_tag: tag for the sweep step (None = automatic). properties: extra study-step properties to set on the sweep step. add_solver_step: append a solver step when the study has no other step. solver_step_type: type of that solver step (default "Stationary"). solver_step_properties: properties for the appended solver step. model: model name/tag (None = current model).

Example: study_add_sweep(pname="k", plist=["1", "5", "10"], punit="W/(m*K)", study="std_parametric")

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": {
      "pname": "<pname>",
      "plist": "<plist>"
    },
    "name": "study_add_sweep"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
plistYes
pnameYes
punitNo
studyNo
step_tagNo
propertiesNo
sweep_typeNoParametric
add_solver_stepNo
solver_step_typeNoStationary
solver_step_propertiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/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 disclose meaningful side effects: the step is inserted before the solving step, the study is created if absent, and a Stationary solver step is appended when the study is otherwise empty. It still omits what is returned and how duplicate/invalid pname errors surface.

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?

Purpose and insertion behavior are front-loaded, followed by a structured Args block and a concrete example. Length is justified by the large undocumented parameter set, though the Args prose could be slightly tighter.

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

Completeness3/5

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

For an 11-parameter mutating tool with no annotations and no output schema, the description covers behavior and parameter semantics well. It remains incomplete on return value, error/duplicate handling, and interaction with existing solver steps beyond the empty-study case.

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%, yet the Args block documents all 11 parameters, including non-obvious formats for plist (list, comma string, range(...) expression, flat list for multi-parameter, unit-bearing values) and the sweep_type/solver_step_type vocabularies with defaults. This adds substantial meaning beyond the bare schema.

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?

The description opens with a specific verb and resource ('Add a sweep study step') and enumerates the sweep variants (parametric/material/batch/sensitivity), so the agent knows exactly what is created. It does not explicitly distinguish itself from siblings like study_parametric or study_add_step, which keeps it from a 5.

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 context is implied rather than stated: the insertion-before-solver behavior and auto-create/auto-append fallbacks tell the agent what will happen, but there is no explicit 'use this instead of X when Y' guidance relative to the parametric/sweep siblings. The example clarifies a typical call, which partially compensates.

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