Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

mat_assign

Assigns a COMSOL material to chosen domains using entity numbers, a named selection, or all domains to set up model materials.

Instructions

Assign a material to domains (explicit numbers, named selection or all).

In COMSOL, materials are assigned to domains (3 in 3D, 2 in 2D).

Args: tag: material tag, e.g. "mat1". entities: domain entity numbers, e.g. [1, 2]. named: named selection tag (created with selection tools). all_domains: true = assign every domain. component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model).

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

Input Schema

NameRequiredDescriptionDefault
tagYes
modelNo
namedNo
entitiesNo
componentNocomp1
all_domainsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full disclosure burden, and it does not state whether assignment replaces a material already on those domains, what happens when the tag does not exist, whether the call errors on invalid domain numbers, or what is returned. It does supply defaults for component ("comp1", "" or "global") and model (None = current model), plus the 'all_domains: true = assign every domain' semantics, which is some value. But the core mutation semantics of a write operation are undisclosed.

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?

It is front-loaded: the capability sentence comes first, followed by domain context, then an Args block. The Args block does restate parameter names, but at 0% schema coverage that restatement is doing real work rather than padding. Nothing is verbose, though the Args style is closer to schema echo than prose an agent can scan.

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 a six-parameter mutation tool with no annotations and no output schema, the definition covers the input surface well but leaves the behavioral surface thin: no overwrite semantics, no failure modes, and no indication of what the call returns or how to confirm success. An agent can construct the call correctly from this description but cannot predict its side effects confidently.

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

Parameters4/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, and it largely does: all six parameters get meaning beyond their titles, including examples (tag "mat1", entities [1, 2]), the fact that named refers to a selection tag created with selection tools, the sentinel values for component, and the None-means-current-model convention for model. The remaining gap is that it never states whether entities, named, and all_domains are mutually exclusive or how conflicts resolve.

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 opening sentence states a specific verb and resource (assign a material to domains) and enumerates the three targeting modes (explicit numbers, named selection, all). It is unambiguous and distinct from the mat_* siblings that create, list, inspect, or remove materials. No sibling is explicitly named as a non-overlapping alternative, which keeps it out of 5 territory.

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 parenthetical 'explicit numbers, named selection or all' implies the choice of targeting mode, and 'materials are assigned to domains (3 in 3D, 2 in 2D)' gives geometric context. However, there is no explicit when-to-use statement, no guidance on whether the modes may be combined or which wins, and no prerequisites such as needing an existing material tag. Usage is inferred rather than stated.

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