Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

mesh_boundary_layers

Adds prism boundary layers to selected COMSOL boundaries and domains, assigning face selections so COMSOL generates the layers with specified count, stretching, and thickness.

Instructions

Add boundary layers (prism elements) on selected boundaries.

Creates a BndLayer feature (selecting domains) with a BndLayerProp child (selecting faces). COMSOL only generates the layers when the child has a face selection, so this tool always assigns one (all faces by default).

Args: layers: number of boundary layers (default 3). stretching: stretching factor between consecutive layers (default 1.2). thickness: first-layer thickness or total thickness, e.g. "0.01" or "1[mm]"; omit to keep COMSOL's automatic thickness. thickness_type: "first" (default, thickness = first layer height) or "total" (thickness = total boundary-layer thickness). domains: domain numbers that receive boundary layers (default all). boundaries: face numbers that get layers (default all faces). named: named selection for the domains. all_domains: apply to all domains (default true). all_boundaries: apply to all boundaries (default true). properties: extra BndLayer/BndLayerProp properties, e.g. {"sharpcorners": "split", "method": "latest"}. mesh: mesh sequence tag (None = first). component: component tag (None = auto-detect). model: model name/tag (None = current model). Example: mesh_boundary_layers(layers=4, stretching=1.3, thickness="0.005", boundaries=[1, 2, 3])

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mesh_boundary_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
meshNo
modelNo
namedNo
layersNo
domainsNo
componentNo
thicknessNo
boundariesNo
propertiesNo
stretchingNo
all_domainsNo
all_boundariesNo
thickness_typeNofirst

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does real work: it explains the two-feature structure (BndLayer parent selecting domains, BndLayerProp child selecting faces) and the non-obvious prerequisite that layers only generate when the child has a face selection, which explains the all-faces default. It does not say whether this triggers a mesh build or leaves the sequence stale (requiring mesh_build/mesh_run), nor whether existing features are replaced, which is the main remaining gap for a mutation tool.

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 purpose and key constraint come first, then a compact per-argument block and a call example — appropriate structure for a 13-parameter tool. The bolded constraint sentence is slightly emphatic but justified. Length is driven by genuine parameter count rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter mutation tool with no annotations and no output schema, the description covers parameters, entity semantics and the face-selection prerequisite well. It stops short of stating the post-call state (does the mesh need rebuilding? what is returned? what happens to pre-existing boundary-layer features?), which an agent needs before sequencing this with mesh_build.

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%, so the description must compensate, and it does for every one of the 13 parameters: layers/stretching defaults, thickness value formats ('0.01' or '1[mm]') and the omit-for-automatic rule, thickness_type semantics ('first' vs 'total'), the domains/boundaries distinction by entity type, the None conventions for mesh/component/model, and a concrete example for the free-form properties dict. The thickness_type values are not enumerated in the schema, so the description adds meaning that is otherwise unavailable.

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: 'Add boundary layers (prism elements) on selected boundaries.' An agent immediately knows this creates a prism/boundary-layer mesh feature. It does not name or differentiate against any sibling (e.g. mesh_add_feature, mesh_mapped, mesh_sweep), so an agent must infer that this is the specialized boundary-layer path rather than a generic feature-adder.

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 physics (boundary-layer meshing on selected boundaries/domains) and the example shows a typical call, but there is no explicit statement of when to prefer this over mesh_add_feature or other meshing siblings, and no preconditions or exclusions. The note that COMSOL only generates layers when the child has a face selection is a useful behavioral constraint rather than routing guidance.

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