Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

result_integrate

Integrate expressions over COMSOL domains, boundaries, or edges with dimension-aware measures and units, then store results in a table for comparison and reporting.

Instructions

Integrate expressions over domains, boundaries or edges.

Dimension-aware COMSOL types (verified): 3D -> IntVolume (domains) / IntSurface (boundaries) / IntLine (edges); 2D -> IntSurface (domains) / IntLine (boundaries). Physical unit includes the integration measure, e.g. "m^3K" for T over a 3D volume or "m^2K" over a 2D domain.

Args: expressions: expressions to integrate, e.g. ["T"]. kind: "volume"/"domain" (domains), "surface"/"boundary" (boundaries) or "line"/"edge" (edges; 2D: boundaries). dataset: dataset tag (None = default solution dataset). entities: entity numbers of the resolved dimension (3=domains, 2=boundaries, 1=edges in 3D; 2D: 2=domains, 1=boundaries); default = all entities of that dimension. 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_integrate"
  }
}

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

A4/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 does reasonably well: it discloses the COMSOL result type produced per dimension and warns that the returned physical unit includes the integration measure (e.g. "m^3*K"), which prevents misinterpretation. It leaves gaps on failure modes, whether writing to a table is a side effect, and what the call returns when table is null.

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 operation summary is front-loaded in one sentence, followed by the dimension/type table and per-argument notes; every block maps to something an agent needs. It is slightly long, and the unit example could be trimmed, but nothing is filler.

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 an 8-parameter, annotation-free tool with no output schema, the description supplies the dimension semantics, unit convention, and all parameter defaults that an agent needs to call it correctly. The main remaining gap is the return shape and error behavior when an expression or entity is invalid.

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 documents all eight parameters: kind value variants, dataset default, entity numbering per dimension with defaults, named_selection as an alternative to entities, 1-based solnum, table storage target, and model default. This is meaning the bare schema titles do not convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Integrate expressions over domains, boundaries or edges" gives a specific verb (integrate) and resource (expressions over geometric entities), which is distinct from siblings like result_average, result_eval_volume, or result_minmax. The dimension-aware type mapping further pins down exactly what class of operation this is.

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 explains which kind value corresponds to which entity dimension, which is implicit usage guidance for choosing the right mode. It never explicitly says when to prefer this over result_average or result_eval_volume, nor does it state prerequisites such as the model requiring a solved solution, so usage is inferable but not spelled out.

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