Skip to main content
Glama

geometry_add_rectangle

Adds a rectangle to a COMSOL 2D geometry or work plane using specified position and size, so you can create rectangular features for modeling.

Instructions

Add a rectangle to a 2D geometry or work plane.

Args: position: Base position [x, y] in meters size: Dimensions [width, height] in meters geometry_name: Geometry sequence name (default: first geometry) component_name: Component name (default: 'comp1') feature_name: Feature name (auto-generated if None) model_name: Model name (default: current model)

Returns: Created rectangle info

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

Input Schema

NameRequiredDescriptionDefault
sizeNo
positionNo
model_nameNo
feature_nameNo
geometry_nameNo
component_nameNocomp1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/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 disclosure burden, and it omits that this is a mutating operation on model state, what happens if a feature with the same name exists, whether the geometry is rebuilt automatically, and what 'Created rectangle info' actually contains. Units in meters are a useful addition, but key behavioral traits are undisclosed.

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 a single clear sentence, followed by a scannable per-parameter list and a one-line return note. The return line is vague filler but consumes minimal space; nothing else is redundant.

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?

Parameters are fully covered, which is the hardest part for a 6-param tool with 0% schema coverage. However, with no output schema the description must explain return values and only says 'Created rectangle info', and mutation side effects and follow-up requirements (build step) are left unstated.

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 coverage is 0%, so the Args block is doing real work: it documents all six parameters with units and defaults that match the schema. The one gap is that the schema permits string entries in size/position (suggesting expressions), which the description never explains.

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 ('Add a rectangle') plus a scope restriction ('2D geometry or work plane'), which inherently separates it from siblings like geometry_add_circle and geometry_add_block. It never names an alternative explicitly, but the shape name does the discriminating work.

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 guidance on when to choose this over other geometry_add_* tools, no prerequisites (e.g. whether a geometry must already exist or whether geometry_build must follow), and no exclusions such as 3D geometry. The defaults hint at implicit behavior but constitute parameter documentation, not usage routing.

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