Skip to main content
Glama

comsol_mesh

Build, refine, and inspect COMSOL meshes: set global/local element sizes, add free, mapped, swept, boundary-layer, and size features, then check element counts and quality.

Instructions

网格工具。action=list 查看特征树和统计;build 生成网格;size 设置全局尺寸(level 1-9,1 最细 9 最粗;或用 properties 自定义 hmax/hmin/hgrad/hcurve);add 添加网格特征(FreeTri/FreeQuad/Map/Sweep/BndLayer/Size/Distribution/Refine/Import);update 改属性或选择;remove 删除;stats 只看统计和质量。局部细化:add feature_type=Size,selection 传实体编号,entity_dim 传维度;边界层:先 add BndLayer,再 add BndLayerProp 且 parent 指向 BndLayer 的 tag。Sweep 的源面要传 selection_name='sourceface' 和 entity_dim=2(3D),层数用 parent=swe 的 Distribution 特征设置 numelem。Size/Distribution 会自动排到网格操作之前。结果含单元数、顶点数、最小/平均质量。

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": "comsol_mesh"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo
meshNo
sizeNo
levelNo
actionNobuild
parentNo
componentNo
selectionNo
entity_dimNo
propertiesNo
feature_typeNo
selection_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.5

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it discloses several non-obvious behaviors: level 1 is finest and 9 coarsest, custom sizes go through properties with hmax/hmin/hgrad/hcurve, Size/Distribution features are automatically reordered ahead of mesh operations, and Sweep layer counts are set via a Distribution child with parent=swe. It does not state that remove is destructive or irreversible, nor whether build is long-running or fails on an unmapped geometry, which is a real gap for a mutation tool with zero annotation coverage.

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 with the action list before any procedural detail, and every clause carries operational information with no filler. It is dense and semicolon-packed, which slightly hurts scannability, but nothing could be cut without losing required knowledge.

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

Completeness1/5

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

Placeholder.

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% across 12 parameters, so the description must compensate, and it does for most of them: it explains the action enum, level semantics and range, the properties object with concrete keys, selection (entity numbers), entity_dim, feature_type values, parent chaining, and the special selection_name='sourceface' for Sweep. However, tag, mesh, component, and the standalone integer size parameter are never explained, leaving roughly a third of the parameters undocumented in both schema and description.

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?

Opens with a specific verb+resource (网格工具) and then enumerates every action verb with its object: list the feature tree and stats, build the mesh, size the global size, add mesh features, update properties or selection, remove a feature, and stats for quality. The enumerated feature_type values (FreeTri/FreeQuad/Map/Sweep/BndLayer/Size/Distribution/Refine/Import) make it unmistakable from siblings such as comsol_geometry or comsol_physics.

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

Usage Guidelines4/5

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

Gives per-action guidance, including a clear split between list (feature tree plus stats) and stats (quality only), and lays out the correct order of operations for local refinement (add feature_type=Size with selection plus entity_dim) and boundary layers (add BndLayer first, then BndLayerProp with parent pointing to the BndLayer tag). What is missing is guidance for when to use comsol_mesh rather than a sibling such as comsol_geometry, and when not to call build (for example, before physics is set up).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.