Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

result_average

Averages COMSOL expressions over domains, boundaries, or edges and stores results in a table for dimension-aware simulation analysis.

Instructions

Average expressions over domains, boundaries or edges.

Dimension-aware COMSOL types (verified): 3D -> AvVolume / AvSurface / AvLine; 2D -> AvSurface (domains) / AvLine (boundaries).

Args: expressions: expressions to average, e.g. ["T"]. kind: "volume"/"domain", "surface"/"boundary" or "line"/"edge" (2D: boundaries). dataset: dataset tag (None = default solution dataset). entities: entity numbers of the resolved dimension (default = all). named_selection: named selection instead of entities. 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

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": {
      "expressions": "<expressions>"
    },
    "name": "result_average"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNovolume
modelNo
tableNo
solnumNo
datasetNo
entitiesNo
expressionsYes
named_selectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: the dimension-to-type mapping, that dataset=None means the default solution dataset, entities default to all, solnum is 1-based and None means all solutions, and that table stores the result (a side effect). It does not say whether the computed average is also returned, how errors surface if a requested dimension type is unavailable, or whether the table is created if absent.

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?

Front-loaded one-line purpose followed by a compact, scannable Args block that maps one entry per parameter; no filler sentences and no redundancy with the schema. The dimension table is placed early where it most affects the caller's choice of kind.

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?

For an 8-parameter tool with no annotations and no output schema, the description covers inputs well but leaves the return contract ambiguous — it is unclear whether the average is returned in the response or only written to the named table. A single sentence on the return value and on failure behavior would close the remaining gap.

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 several parameters are untyped in the schema, so the description must compensate, and it largely does: every one of the 8 parameters is documented with meaning and defaults, including the kind synonyms ("volume"/"domain", "surface"/"boundary", "line"/"edge") and the note that boundaries apply in 2D. The gaps are that entities/solnum/table lack type or format detail (e.g. accepted solnum forms) beyond what is stated.

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 ("Average expressions over domains, boundaries or edges") and immediately clarifies how the abstract kind maps to concrete COMSOL types (AvVolume/AvSurface/AvLine by dimension). It is clear what the tool computes, though it never contrasts itself with sibling evaluation tools such as result_integrate or result_eval_volume, which an agent might plausibly confuse it with.

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 kind parameter and the dimension-mapping table, so an agent can infer which kind to pick for a 2D vs 3D model. However, there is no explicit when-to-use/when-not guidance and no named alternative (e.g. use result_integrate for total flux rather than an average), leaving the choice between averaging and other result tools to inference.

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