Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

mat_import_xml

Import materials from a COMSOL material XML file into a model, with optional filtering by material tags, component, and model name.

Instructions

Import materials from a COMSOL material XML file (.xml) into the model.

The XML file may contain one or more <material> definitions in COMSOL's Model XML format (the same format as comsol_optical_lib.xml). When tags is omitted every material tag found in the file is imported.

Args: path: absolute path to the material XML file. tags: material tags inside the XML file to import (None = all). 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": {
      "path": "<path>"
    },
    "name": "mat_import_xml"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
tagsNo
modelNo
componentNocomp1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/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 real behavior: the file may contain one or more <material> definitions, all tags are imported when tags is omitted, and component accepts '' or 'global'. However, it never says whether existing materials are overwritten, what happens on duplicate tags or malformed XML, whether the operation is atomic, or what is returned. For a mutating import tool this leaves meaningful gaps.

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 purpose sentence followed by a format clarification and a compact Args block. The 'Args:' list is somewhat redundant with the schema but justified given 0% schema description coverage. Nothing is padded or tangential.

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?

No annotations and no output schema, so the description must supply the whole operational picture. It covers the input side well but omits failure modes, overwrite semantics, and any indication of what the caller gets back after importing. Adequate but not complete for an unannotated mutation tool.

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 description coverage is 0%, so the description must compensate, and it does: path is specified as an absolute path, tags as material tags inside the file with None meaning all, component documents the default 'comp1' plus the special '' / 'global' values, and model explains None means the current model. Only modest gaps remain (no format example for tags).

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: 'Import materials from a COMSOL material XML file (.xml) into the model.' This is clearly distinguishable from sibling mutators like mat_add or mat_create, and the parenthetical clarifies the exact file format expected. It stops short of naming a sibling alternative explicitly, so it is clear rather than best-in-class.

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 is implied by the tool name and the format note (the file must use COMSOL's Model XML format, same as comsol_optical_lib.xml). The 'When tags is omitted every material tag found in the file is imported' sentence is parameter behavior, not when-to-use guidance. There is no explicit statement of when to choose this over mat_add, mat_create, or mat_library_* tools.

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