Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

phys_add_bc

Add boundary or domain conditions to a COMSOL model using interface aliases or raw feature types, with selections and property values.

Instructions

Create a boundary/domain condition through a friendly alias.

Aliases map to the real COMSOL feature type and property names, and pre-set any required switches (e.g. convection sets HeatFluxType=ConvectiveHeatFlux, radiation sets epsilon_rad_mat=userdef). If bc is not a known alias it may still be a raw COMSOL feature type valid for that interface.

Verified aliases by interface type: HeatTransfer: temperature(T0), heat_flux(q0_input), convection(h,Text), radiation(epsilon_rad,Tamb), heat_source(Q0), initial(Tinit), insulation; SolidMechanics: fixed, prescribed_displacement(Direction+U0 vector), roller, initial(u), and three load types: boundary_load with F/load = per-area traction [N/m^2] (ForceArea + forceReferenceArea), total_force/force = total force [N] (TotalForce + force), pressure/p = normal pressure [Pa] (FollowerPressure + pressure); pressure_load(p) = normal pressure shortcut; body_load with F/load = per-volume force [N/m^3] (ForceVolume + forceReferenceVolume) or total_force/force = total force [N]; note: on a COMSOL BoundaryLoad/BodyLoad the property "F" is only the DERIVED resultant force - it does not apply a load, so these aliases write the real input properties instead; LaminarFlow: inlet(U0in), outlet(p0), wall, symmetry, volume_force(F), initial; Electrostatics: ground, electric_potential(V0), surface_charge(rhoqs), space_charge(rhoq), zero_charge, initial(V); ConductiveMedia (electric currents): terminal(TerminalType,V0,I0), ground, electric_potential(V0), normal_current_density(nJ), initial(V2); PressureAcoustics: sound_hard, sound_soft, normal_velocity(nvel), impedance(Zn), pressure(p0), initial(p2); ElectromagneticWavesFrequencyDomain: pec, pmc, port(PortName,Pin), scattering(IncidentField), initial(E); DilutedSpecies: concentration(c0), inflow(c0), outflow, no_flux, reactions(R_c), initial(initc).

Args: interface: interface tag/label/type (e.g. "ht"). bc: alias name (e.g. "temperature") or a raw COMSOL feature type. selection: entity list, "all", or a named-selection tag. named_selection: named selection tag to assign. all_entities: select all entities of the condition's dimension. properties: property values using real COMSOL names or documented aliases, e.g. {"T0": "400[K]"} or {"T": "400[K]"}. tag: new feature tag (None = auto). label: optional display label. entity_dim: override the entity dimension (3=domains, 2=boundaries). 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": {
      "interface": "<interface>",
      "bc": "<bc>"
    },
    "name": "phys_add_bc"
  }
}

Input Schema

NameRequiredDescriptionDefault
bcYes
tagNo
labelNo
modelNo
interfaceYes
selectionNo
entity_dimNo
propertiesNo
all_entitiesNo
named_selectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does substantial work: it discloses that aliases pre-set required switches (e.g. convection sets HeatFluxType=ConvectiveHeatFlux, radiation sets epsilon_rad_mat=userdef) and warns that COMSOL's BoundaryLoad 'F' is a derived resultant rather than the applied load, so the aliases write the real input properties. That is exactly the kind of side-effect disclosure an agent needs. It omits what happens on an unknown alias, whether the new feature is enabled by default, and what is returned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first line and every block is relevant, but the per-interface alias catalogue is long and flat, making the definition bulky to scan and pushing the argument documentation far below the fold. Given no enum is supplied in the schema, the bulk is defensible, but it is closer to a reference table than a tight description.

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 10-parameter mutation tool with no annotations and no output schema, the definition covers intent, valid alias values per interface, selection mechanics, and a critical numerical-semantics caveat about force vs pressure conventions. The main remaining gap is the return value and error behavior, which the absence of an output schema leaves unaddressed.

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% and there are 10 parameters, so the Args block does all the work — and it covers every parameter, including the non-obvious ones (selection vs named_selection vs all_entities, entity_dim override, properties keyed by real COMSOL names or aliases with an example). Wording on tag/label/model is thin ('new feature tag (None = auto)') but the essentials are present.

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?

The opening sentence gives a specific verb and resource: 'Create a boundary/domain condition through a friendly alias.' It goes further than the name by explaining that the alias maps to a real COMSOL feature type and pre-sets switches. It does not explicitly distinguish itself from the sibling phys_add_feature, so the differentiation is only implied by the alias mechanism.

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?

The description gives a fallback rule ('If bc is not a known alias it may still be a raw COMSOL feature type valid for that interface') and a per-interface list of what values are valid, which effectively tells the agent when the tool applies. However, it never states when to prefer this over phys_add / phys_add_feature, nor are there prerequisites or failure conditions.

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