Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

mat_create

Create a manual material with explicit property values and units, without needing a library. Assign it to chosen domains, named selections, or all domains in a COMSOL model.

Instructions

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 selection. all_domains: true = assign all domains. tag: material tag (default auto mat1, ...). label: custom label (default: name). model: model name/tag (None = current model). Example: mat_create(name="Steel custom", properties={"density": "7850[kg/m^3]", "thermalconductivity": "44.5[W/(mK)]", "heatcapacity": "475[J/(kgK)]"}, selection=[1])

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

Input Schema

NameRequiredDescriptionDefault
tagNo
nameYes
labelNo
modelNo
namedNo
groupsNo
componentNocomp1
selectionNo
propertiesNo
all_domainsNo
material_typeNoCommon

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations at all, the description carries the full behavioral burden. It does disclose useful defaults (tag auto mat1, component comp1, label defaults to name, material_type defaults to Common) and the "" / "global" special value for component. But it says nothing about side effects beyond node creation, what happens on a duplicate tag, whether a material with no selection is left unassigned, or whether an error is raised for malformed property expressions.

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 with a one-sentence purpose followed by an Args list and a worked example — a sensible structure for an 11-parameter tool with no schema descriptions. The parameter list is long but each entry earns its place; the trailing "..." in the material_type and groups enumerations is the only slack.

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 mutation with no annotations, the description covers inputs thoroughly and gives an example, which is most of the job. It stops short of stating what the call returns (e.g. the created tag) or how failures such as an invalid property expression or conflicting selection/named/all_domains are surfaced, which matters more given there is no output schema.

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% and all 11 parameters are documented in the Args block with meaning, defaults, and format. It adds genuine semantics the schema cannot: COMSOL expression syntax with units, that anisotropic tensors are lists of 9 values, that groups keys are COMSOL group types (Enu, linzRes, idealGas), and the enumeration of material_type values.

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+resource+qualifier: "Create a manual material with explicit properties (no library needed)." The parenthetical implicitly distinguishes it from the library-backed siblings (mat_library_list, mat_import_xml), but never names an alternative explicitly, so it stops short of the top mark.

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?

The "no library needed" phrasing implies the use case (defining a material from scratch rather than pulling from a library or XML), and the example shows a typical call with selection=[1]. However, there is no explicit statement of when to prefer this over mat_add or mat_import_xml, nor any exclusions or prerequisites.

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