Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

result_mass_properties

Computes volume and mass for selected COMSOL domains and solutions, with optional named selections, custom expressions, and table storage.

Instructions

Volume, mass (and center-of-mass unit) of selected domains.

Uses the COMSOL MassProperties feature (verified working with the default three-expression set ["1", "comp1.spatial.rho", "1/1[m^2]"]). Returned rows are [volume, mass]; units ["m^3", "kg"]. The third unit ("m") belongs to the (optional) center-of-mass expression.

Args: dataset: dataset tag (None = default solution dataset). entities: domain numbers (default = all domains). named_selection: named domain selection instead of entities. expressions: optional explicit 3 expressions (volume, mass, arm); default is COMSOL's density-based set. Must have length 3. solnum: 1-based solution number(s) (None = all). table: table tag to store the result in. model: model name/tag (None = current model).

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": "result_mass_properties"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
tableNo
solnumNo
datasetNo
entitiesNo
expressionsNo
named_selectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/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 return layout (rows of [volume, mass]), units (["m^3", "kg"] with "m" for the arm expression), the default expression set, and the constraint that custom expressions must have length 3. It also reveals the write side effect of storing results in a table. It stops short of describing failure modes or what happens if the table already exists.

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

Conciseness5/5

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

The description is front-loaded with the outcome and return format, then a clean Args list one parameter per line. No filler sentences; each line carries distinct information an agent needs.

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 7-parameter tool with no output schema and no annotations, the definition covers inputs, defaults, output shape and units. The only meaningful omission is behavior around table storage (overwrite vs append) and error/precondition handling for missing density expressions.

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 Args block is doing essential work: it explains dataset None = default solution dataset, entities default = all domains, named_selection as an alternative selector, solnum as 1-based solution numbers, table as the storage target, and the three-expression ordering (volume, mass, arm). Minor gaps remain, such as the exact accepted type for solnum and entities.

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 first line states a concrete verb-resource pair: volume, mass and center-of-mass units for selected domains, backed by the COMSOL MassProperties feature. It also names the exact returned rows and units, so an agent can tell this is a mass/volume property evaluator. It does not explicitly contrast itself with similar siblings such as result_integrate or result_measure, so sibling differentiation is left implicit.

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 implies usage through the 'verified working with the default three-expression set' note and clarifies that entities, named_selection and dataset are alternatives with None defaults. However, it never states when to choose this over result_integrate, result_eval_volume or result_measure, nor does it give preconditions such as requiring a density variable in the model.

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