Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

variable_set

Define a global variable expression in a COMSOL model to parameterize geometry, physics, and study settings for reuse across simulations.

Instructions

Define a global variable expression (name = expression).

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": {
      "name": "<name>",
      "expression": "<expression>"
    },
    "name": "variable_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
modelNo
selectionNo
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but says nothing about whether redefining an existing name overwrites it, whether the expression is evaluated immediately or lazily, or what side effects occur in the model tree. For a mutation tool with zero annotation coverage this is a real gap.

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?

A single short sentence, front-loaded with the verb and resource, with the syntax hint in parentheses. Nothing is wasted, though brevity here shades into under-specification rather than economy.

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

Completeness2/5

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

Four parameters, none documented in the schema, no annotations, and no output schema leaves the description doing too little. An agent cannot tell what 'model' and 'selection' scope this variable to, nor what happens on a name collision.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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. It clarifies the roles of name and expression via the ``name = expression`` notation, but the model and selection parameters are never mentioned and remain completely opaque.

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 description states a specific verb and resource ('Define a global variable expression') and clarifies the syntax as ``name = expression``. That distinguishes it adequately from siblings like variable_list and variable_remove, though it never says how it differs from parameter_set or other property setters.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites (e.g., whether a model must be open), and no mention of alternatives such as parameter_set for non-global values. The agent must infer context entirely from the tool name.

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