Skip to main content
Glama

get_mass_properties

Calculate mass, volume, surface area, center of mass, density, and principal moments of inertia for a SolidWorks part or assembly to support quoting, lightening analysis, or dynamic inertia studies.

Instructions

Propiedades de masa — read mass, volume, surface area, center of mass, density, and principal moments of inertia for the active part OR assembly (works on both doc types). Read-only.

Returns a dict in mm-native units: - mass_g (float, gramos): total mass in grams. - volume_mm3 (float): total volume in mm³. - surface_area_mm2 (float): total surface area (área superficial) in mm². - center_of_mass_mm (list[float], 3): [x, y, z] of the centro de gravedad in the part frame (mm). - density_kg_per_m3 (float): density (densidad) in kg/m³ — the SW canonical density unit, NOT mm-converted. - principal_moments_g_mm2 (list[float], 3): [Ixx, Iyy, Izz] in g·mm² about the centroid.

Caveat: requires a material to be set on the part for mass to be meaningful. SW's "Default Material" returns mass_g=0 (no density assigned). Call set_material first if the part has no material.

Common autoparts uses: - Cotización (quoting): mass_g × material price/kg. - Lightening pass: measure mass before / after a vaciado, target a mass reduction without dropping below stiffness threshold. - Inertia for dynamic analysis: principal_moments_g_mm2.

Example — quote a turned shaft: set_material("AISI 1045 Steel") props = get_mass_properties() cost = (props["mass_g"] / 1000) * 65.0 # MXN/kg

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations provided, so description carries full burden. It states read-only behavior, caveat about default material, and details the return fields with units. It could mention performance or side effects, but for a read-only tool this is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a summary line, detailed return fields, caveat, common use cases, and an example. Every sentence adds value and it is front-loaded with the purpose.

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

Completeness5/5

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

Despite having no output schema, the description thoroughly explains the return dictionary with units, field names, and interpretation. It also provides common use cases and prerequisites, making it complete for a zero-parameter tool.

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?

There are no parameters, so description does not need to add param info. Baseline for 0 parameters is 4.

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 clearly states it reads mass properties for the active part or assembly. The verb 'get' and resource 'mass properties' are specific, and it distinguishes from sibling tools by being a read-only query tool.

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?

It explicitly mentions it is read-only, works on both part and assembly, requires a material to be set, and provides a common usage example with set_material. It does not explicitly list alternatives, but context is clear enough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielproxd2/MCP_CAD'

If you have feedback or need assistance with the MCP directory API, please join our Discord server