Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

mat_get_selection

Read the domain selection assigned to a material in a COMSOL model to verify which geometry domains use that material.

Instructions

Read the domain selection of a material.

Args: tag: material tag, e.g. "mat1". 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_get_selection"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagYes
modelNo
componentNocomp1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the whole burden. It implies a read-only lookup, but says nothing about what happens when the material tag or component does not exist, whether an empty selection is returned versus an error, or whether permissions or model state matter. Only the bare operation is disclosed.

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 one-line summary is front-loaded and the Args block is compact and scannable with no filler. The docstring format is slightly mechanical but every line conveys information.

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 three-parameter read tool with no annotations and no output schema, the description covers inputs well but leaves the return value entirely unexplained - an agent cannot know whether it gets entity IDs, domain numbers, or a boolean. That gap is the main incompleteness, though the input side is adequately specified.

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% and the schema titles are bare names, so the Args block is doing real work: it gives a concrete tag example ("mat1"), states the component default ("comp1") and that "" or "global" selects the global domain, and clarifies that model=None means the current model. That is meaningful semantics beyond the schema, though it never explains how component relates to the returned selection.

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?

States a specific verb and resource: "Read the domain selection of a material." An agent can tell it retrieves a selection rather than mutating a material, which distinguishes it from mat_set_property or mat_assign. It does not, however, distinguish itself from siblings like phys_get_selection, selection_get, or tree_selection_get, so the reader must guess which selection getter applies.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no condition selecting this over selection_get or phys_get_selection, and no stated prerequisites. The Args block explains parameter formats only, leaving the agent to infer that this tool is for material-domain selections specifically.

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