Skip to main content
Glama
COMSOL Multiphysics MCP Server

COMSOL Multiphysics MCP Server

by zixuanguo89

result_export_data

Exports COMSOL expression data to CSV or TXT files, including units, selected datasets, solution numbers, or custom coordinates, and returns the file path, row count, and preview.

Instructions

Export expression data to a CSV/TXT file (COMSOL Data export).

Writes mesh-node/dataset-point values with a COMSOL comment header that contains the units (e.g. % X,Y,Z,T (K)). Files are written into the artifact workspace unless filename is absolute. The response includes the path, column names with units, row count and a preview.

Args: expressions: expressions to export, e.g. ["T"]. dataset: dataset tag (None = default solution dataset). CutPlane / CutPoint datasets work and export their points. filename: output path; relative paths go to the artifact workspace. Extension .csv or .txt (default .csv). coords: optional explicit coordinates -> creates a temporary CutPoint3D dataset and exports the values at those points. solnum: 1-based solution number(s) (None = all); for multi-solution datasets every selected solution becomes a block in the file. 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_export_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
coordsNo
solnumNo
datasetNo
filenameNo
expressionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/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: it discloses that files are written to the artifact workspace unless the filename is absolute, that the header encodes units, that multi-solution exports become blocks, and that the response returns path, column names with units, row count, and a preview. It omits overwrite semantics for existing files and error/failure behavior, which keeps it from a 5.

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 first paragraph front-loads the core behavior, output format, and return payload, and the Args block is compact and scannable. It is somewhat formulaic docstring prose with no wasted sentences, though a few lines (e.g. the duplicated workspace-path note) restate what the body already covers.

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 mutation tool with no output schema and no annotations, the definition is close to self-sufficient: it explains side effects, path resolution, units in the header, and what the response contains. Gaps remain around overwrite behavior, failure modes (e.g. invalid expression or dataset), and the exact preview format, which an agent would want before calling.

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 do all the work, and it documents every one of the six parameters with meaning beyond the bare types: expressions format with an example, dataset tags including CutPlane/CutPoint, filename extension and relative-path resolution, coords triggering a temporary CutPoint3D dataset, 1-based solnum semantics, and model defaulting to the current model.

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?

The description names a specific verb (export) and resource (expression data evaluated at mesh-node/dataset points) and pins the output format (CSV/TXT with COMSOL comment header). This distinguishes it from image, geometry, and mesh exporters among the siblings, since it writes evaluated numeric values rather than files describing geometry or plots.

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 context is only implied: it exports expression values, and defaults such as 'dataset=None means default solution dataset' and 'solnum=None means all' are stated. There is no explicit when-to-use or when-not-to-use guidance, and no routing to alternatives like plot_export_plot_data or result_eval_point, so an agent must infer the boundaries itself.

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