Skip to main content
Glama

set_material

Assign a material to the active part to enable accurate mass, volume, and inertia calculations. Optionally use a custom .sldmat database.

Instructions

Asignar material — set the material on the active part. Required before get_mass_properties returns a meaningful mass.

Maps to the SolidWorks UI's "Edit Material…" panel. Standard SW system materials work by name; database_path lets shop-specific custom .sldmat libraries override the system DB.

Args: name: Material name as it appears in the chosen library. Common autoparts examples (in the SW system DB): - Aceros: "AISI 1020", "AISI 1045 Steel", "AISI 4140", "Plain Carbon Steel" - Aluminios: "6061-T6 Aluminum", "7075-T6 Aluminum", "AlSi10Mg" (cast / fundición a presión) - Plásticos: "Nylon 6/10", "ABS", "PC High Viscosity" Names are LOCALE-sensitive — Spanish SW installs may use translated names (e.g. "Acero AISI 1045"). If the call raises with "did not apply material", check the SW material list in the current install. database_path: Optional absolute path to a .sldmat material database. None (default) uses the SW system database. Pass a path to load shop-custom alloys (e.g. specific casting recipes, supplier-graded steels not in the system DB). The file must exist and end in .sldmat.

Returns: dict with name, applied (always True on success), previous (the prior material name or None), database (the resolved DB path; "" for system).

Caveat: changing material affects mass / volume / inertia from get_mass_properties (la densidad cambia). It does NOT change geometry — fillets, dimensions, and bodies are unaffected.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
database_pathNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses locale sensitivity, effects on mass but not geometry, and the return value. The caveat about changing material affecting mass/inertia is well-stated.

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 description is longer than average but well-structured with sections and bullet points. It is front-loaded with the main purpose and includes an example. Every sentence adds value, though some redundancy could be trimmed.

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?

Given tool complexity (material assignment affecting downstream calculations) and absence of output schema, the description covers prerequisites, effects, return format, caveats, and usage examples. It is fully complete for an agent to use correctly.

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?

Despite 0% schema description coverage, the description provides extensive parameter semantics: examples for name (including locale sensitivity), usage explanation for database_path, and the format/requirements. This far exceeds the baseline of 3.

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 the tool 'set the material on the active part' and distinguishes it from sibling tools. It also notes the prerequisite for get_mass_properties, providing specific verb+resource clarity.

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?

The description explicitly states 'Required before get_mass_properties returns a meaningful mass,' and provides an example usage. It could be improved by mentioning when not to use or alternatives, but it gives clear context for when to use.

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