Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

function_create

Creates a global COMSOL function such as analytic, interpolation, step, or ramp to define reusable expressions for model simulations.

Instructions

Create a global function (analytic, interpolation, step, ramp, ...).

Args: name: function name (used as the function tag; callable as name(t)). function_type: COMSOL function type, e.g. Analytic, Interpolation, Piecewise, Step, Ramp, GaussianPulse, Random, Wave, Rectangle. expression: analytic expression, e.g. "sin(2pif0*t)". args: argument list, e.g. "t" (default "t"). filename: data file for Interpolation / External functions. properties: any additional feature properties to set.

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>"
    },
    "name": "function_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNo
nameYes
modelNo
filenameNo
expressionNo
propertiesNo
function_typeNoAnalytic

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that the resulting tag becomes callable as name(t), which is genuinely useful, but says nothing about whether an existing function with the same name errors or is overwritten, which model the function attaches to, or what the return value is.

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 purpose sentence is front-loaded with the type enumeration immediately after it, and the Args block is compact and scannable. There is no filler, though the docstring-style formatting is slightly verbose compared to a short prose sentence per key parameter.

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 a 7-parameter mutation tool with no annotations and no output schema, the description covers the domain and most parameters but omits model scoping, duplicate-name behavior, and any indication of what is returned. An agent could call it correctly for the common Analytic case but would guess on the rest.

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 inline Args block does the heavy lifting and succeeds for most parameters, giving concrete value examples ('sin(2*pi*f0*t)', args default 't') and clarifying that name doubles as the callable tag. However, the 'model' parameter is entirely undocumented in the description, leaving one of seven parameters with no semantics anywhere.

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?

States a specific verb and resource ('Create a global function') and enumerates concrete function types (analytic, interpolation, step, ramp), which makes the tool's domain unmistakable. It does not explicitly contrast with function_list or function_remove, though the distinction is obvious from the verb.

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 only implied through the parameter list: filename implies Interpolation/External functions, expression implies Analytic. There is no explicit statement of when to reach for this tool versus other creation tools, and no stated prerequisites such as needing an existing 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