Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

mesh_add_feature

Creates a specified COMSOL mesh feature—such as FreeTet, Sweep, Size, or Refine—with properties, selections, and parent settings to support custom meshing workflows.

Instructions

Create a mesh feature of any COMSOL type (generic escape hatch).

Valid types come from catalog_mesh_features (e.g. FreeTet, FreeTri, Map, Sweep, BndLayer, Size, SizeExpression, Distribution, Refine, Import, CopyFace, CornerRefinement, Vertex, ...).

Args: feature_type: COMSOL mesh feature type, e.g. "FreeTet". mesh: mesh sequence tag (None = first). tag: feature tag (None = auto from the type, e.g. "ftet1"). properties: feature properties, e.g. {"method": "delaunay"}. Property names must match COMSOL's; use mesh_features to read the available names of existing features. selection: geometric entity numbers to select. named: named selection tag to select instead. all_entities: select all entities of entity_dim. entity_dim: selection dimension (3=domains, 2=boundaries, 1=edges, 0=points). Default depends on the feature type (FreeTet=domains, FreeTri/Map=boundaries in 3D, BndLayerProp=boundaries). parent: parent feature tag for child features (e.g. BndLayerProp under a BndLayer, CornerProp under CornerRefinement). component: component tag (None = auto-detect). 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": {
      "feature_type": "<feature_type>"
    },
    "name": "mesh_add_feature"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo
meshNo
modelNo
namedNo
parentNo
componentNo
selectionNo
entity_dimNo
propertiesNo
all_entitiesNo
feature_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose useful defaults and side relations: tag auto-derived from type ('ftet1'), model/component auto-detection, and parent-child feature nesting (BndLayerProp under BndLayer). However it never says whether the feature is immediately applied or requires mesh_build, what happens on invalid type/property, or whether existing features are affected.

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 core identity and the pointer to catalog_mesh_features are front-loaded, then a compact Args block maps one line per parameter. For 11 parameters the length is justified, though the parenthetical type list in the first paragraph partly duplicates the feature_type entry.

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?

Given 11 parameters, no annotations, and no output schema, the parameter documentation is complete, but behavioral gaps remain: the return value (presumably a tag) is not stated, nor is the required ordering relative to mesh_build or whether the model must already contain a mesh sequence. An agent knows how to call it but not fully what to expect afterward.

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% with 11 parameters, so the description has to do all the work and largely does: entity_dim is decoded (3=domains, 2=boundaries, 1=edges, 0=points) with per-type defaults, parent is explained with concrete nesting examples, selection vs named vs all_entities are distinguished, and properties is shown with an example plus the warning that names must match COMSOL's.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a mesh feature of any COMSOL type') and explicitly frames the tool as a 'generic escape hatch', which distinguishes it from specialized siblings like mesh_build and mesh_auto_size. It also names the discovery sibling (catalog_mesh_features) that supplies valid types, so an agent can route without opening a schema.

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

Usage Guidelines4/5

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

It gives clear usage context: valid types come from catalog_mesh_features, and existing property names should be read with mesh_features before passing 'properties'. What is missing is an explicit when-not-to-use statement (e.g. prefer mesh_auto_size or mesh_boundary_layers for common cases) and any prerequisite that a mesh sequence must exist.

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