Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

result_eval_global

Evaluate global-scope expressions such as parameters and global variables in COMSOL, returning values with units; use field-evaluation tools for field variables.

Instructions

Evaluate GLOBAL-scope expressions (parameters, global variables).

EvalGlobal works in the model's global scope: parameters, global variables/expressions, global ODE variables. Field variables (e.g. "T" of a 3D heat model) are NOT defined in global scope -use result_eval_point / result_integrate / result_average / result_minmax for fields. Example: expressions=["T0", "2*T0"] after setting parameter T0=400[K] returns [400.0, 800.0] with units [K, K].

Args: expressions: global expressions, e.g. ["T0", "2*T0"]. dataset: dataset tag (None = default solution dataset). 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_eval_global"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
tableNo
solnumNo
datasetNo
expressionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/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 on scope semantics and on defaults (None = default solution dataset, all solutions, current model), and the worked example shows that results come back with units attached. It does not disclose that supplying `table` persists a result into that table (a side effect), nor how output is shaped when `solnum` is None and multiple solutions return.

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?

Front-loads the scope constraint and the sibling routing, then moves to a structured Args list. The example earns its place by pinning down units, but the inline expression example in the Args block partly repeats the earlier one.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter read tool with no annotations and no output schema, the description covers scope, alternatives, per-argument defaults, and an illustrative return value with units. The remaining gaps (table persistence semantics, multi-solution output shape) are modest relative to what is already given.

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 description must compensate, and it defines all five parameters including the untyped `solnum` (1-based, None = all) and the loosely typed `dataset`/`table`/`model`. The expressions example with expected output [400.0, 800.0] adds real meaning, though types and accepted string formats for tags remain unstated.

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?

States a specific verb and resource with an explicit scope qualifier: "Evaluate GLOBAL-scope expressions (parameters, global variables)." It immediately distinguishes itself from the field-evaluation siblings, so an agent can tell which tool applies without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says that field variables like "T" of a 3D heat model are NOT defined in global scope and names four alternatives (result_eval_point / result_integrate / result_average / result_minmax) for that case. Both the when and the when-not, plus the routing, are 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