Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

export_geometry

Export finalized COMSOL geometry to STL, STEP, IGES, Parasolid, ACIS, or native files; validates the output on disk for CAD or analysis workflows.

Instructions

Export a finalized geometry to STL, STEP, IGES, Parasolid, ACIS or native.

Uses COMSOL's geometry export tool: setType(...) then geom.export(path). The file is validated on disk.

Args: type: stl/stlbin (default), stlascii, step, iges, parasolidbin (.x_b), parasolidascii (.x_t), acisbin (.sab), acisascii (.sat), nativebin (.mphbin), nativeascii (.mphtxt). tag: geometry sequence tag (default "geom1"). path: output file path (auto under artifact root when omitted). component: component owning the geometry (default "comp1"). selection: optional geometry object numbers to export; omit for all. model: model name/tag (None = current model).

Notes: STEP/IGES/Parasolid/ACIS need the CAD Import Module or a CAD LiveLink license; STL and native formats work with the base installation. STL exports the boundary surface of the geometry.

Example: export_geometry("step", path="C:/out/part.step") export_geometry("stl", path="C:/out/part.stl")

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "export_geometry"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNogeom1
pathNo
typeNostl
modelNo
componentNocomp1
selectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/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 behavioral burden and does substantial work: it names the underlying COMSOL calls, states the file is validated on disk, explains that STL exports the boundary surface, and flags license-gated formats. Remaining gaps are overwrite behavior and what happens on an invalid path or format.

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-loaded purpose statement, then structured Args, Notes, and Example sections, each of which earns its place. The type enumeration and the two example calls are somewhat verbose but directly reduce invocation errors rather than padding the text.

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 a six-parameter export tool with no output schema and no annotations, the definition covers formats, defaults, licensing, and side effects well. It stops short of saying what the call returns (path, boolean, or nothing), which is the one thing an agent must otherwise guess.

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 entirely, and it does: every one of the six parameters is explained with defaults (tag geom1, component comp1, current model), and the type parameter is fully enumerated with the file extension each option produces. This is meaning the schema cannot supply on its own.

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 opens with a specific verb and resource ('Export a finalized geometry') and enumerates the six supported formats, so the agent knows exactly what the tool does. It does not, however, differentiate itself from nearby siblings such as geom_export or export_mesh, which an agent could 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?

The Notes section gives a real usage constraint: STEP/IGES/Parasolid/ACIS require the CAD Import Module or a CAD LiveLink license, while STL and native work on the base installation. That tells the agent when the tool will fail, but there is no guidance on choosing this over export_mesh or geom_export, so usage is only implied.

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