Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

geom_selection_actions

Creates box, ball, cylinder, or logical geometry selections and returns global entity numbers that can be passed directly to physics and material selections.

Instructions

Create a geometry-sequence selection feature and return matched entity numbers.

The returned numbers are GLOBAL entity numbers of the finalized geometry (the same numbering physics boundary conditions use), so they can be passed straight to physics/material/feature selections.

Args: selection_type: BoxSelection | BallSelection | CylinderSelection | DiskSelection | ExplicitSelection | AdjacentSelection | UnionSelection | IntersectionSelection | DifferenceSelection | ComplementSelection | LogicalExpressionSelection. tag: selection feature tag (None = automatic, e.g. boxsel1). entity_dim: entity dimension to select: 3=domains, 2=boundaries, 1=edges, 0=points, -1=whole objects (default 2). entities: explicit entities for ExplicitSelection as {"object": [ids]}. xmin/xmax/ymin/ymax/zmin/zmax: box limits (BoxSelection); null = unbounded. condition: intersects | inside | somevertex | allvertices. pos: position for BallSelection ([x,y,z]) or CylinderSelection/DiskSelection (Disk: [x,y]; Cylinder: 3D base point). r: radius (Ball/Cylinder/Disk) or cylinder outer radius. axis: axis for CylinderSelection, e.g. ["0","0","1"] or "z". input/add/subtract: tags of preceding selection features used by the set-operation selections (Union/Intersection/Difference/Complement/ Adjacent/LogicalExpression). expression: logical expression for LogicalExpressionSelection, e.g. "sel1&!sel2" (use input tags). cumulative: also create a cumulative selection with this tag and let the new feature contribute to it. properties: extra selection feature properties (e.g. {"selshow": "off"}). label: display label. build: build the geometry after creating the selection (default true). geometry: geometry sequence tag (default "geom1"). component: component tag (None = auto). 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": {
      "selection_type": "<selection_type>"
    },
    "name": "geom_selection_actions"
  }
}

Input Schema

NameRequiredDescriptionDefault
rNo
addNo
posNo
tagNo
axisNo
xmaxNo
xminNo
ymaxNo
yminNo
zmaxNo
zminNo
buildNo
inputNo
labelNo
modelNo
entitiesNo
geometryNogeom1
subtractNo
componentNo
conditionNo
cumulativeNo
entity_dimNo
expressionNo
propertiesNo
selection_typeYes

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 burden and does well: it discloses the side effect that 'build' triggers a geometry build after creating the selection (default true), that 'cumulative' creates an additional cumulative selection feature, that tags auto-generate (e.g. boxsel1) when None, and that the returned numbers are global entity numbers. It does not cover failure modes, permissions, or whether created features are reversible, which keeps it short of a 5.

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 return-value caveat are front-loaded before the argument list, which is the right structure. The arg block is long but nearly all of it is load-bearing for a 25-parameter tool; only minor redundancy exists (e.g. restating axis examples) that could be trimmed.

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 25-parameter mutation tool with no annotations and no output schema, the definition is remarkably complete: it explains the returned value, the build side effect, auto-tagging, and per-parameter semantics. The remaining gap is relational — nothing tells the agent how this tool relates to selection_create or other selection siblings when both could apply.

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% and there are 25 parameters, so the description must compensate — and it does, documenting nearly every parameter: selection_type alternatives, entity_dim encoding (3=domains … -1=whole objects), null-means-unbounded box limits, condition values, pos/r/axis conventions per selection type, input/add/subtract relationships to '*preceding*' features, and the expression syntax 'sel1&!sel2'. This adds meaning far beyond the bare schema titles.

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: 'Create a geometry-sequence selection feature and return matched entity numbers.' It also clarifies the return value's semantics (GLOBAL entity numbering, same as physics boundary conditions), which is genuinely distinguishing. It stops short of naming or contrasting the overlapping sibling selection_create, so differentiation is inferred rather than stated.

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 through the argument documentation — e.g. the returned numbers 'can be passed straight to physics/material/feature selections' — which tells the agent this is the geometry-side selection creator. However, there is no explicit when-to-use/when-not guidance relative to siblings like selection_create, selection_list, or mat_get_selection, and no prerequisites 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