Skip to main content
Glama

diagnose_mesh

Read-only

Detects self-intersections, holes, inverted normals, and floating fragments in 3D mesh files before slicing. Returns a severity-rated defect report with actionable fix steps for Blender or MeshLab.

Instructions

Deep mesh defect analysis — self-intersections, holes, normals, fragments (defect-focused).

        Goes deeper than ``analyze_mesh_geometry`` (which focuses on printability
        scoring and overhang detection). Use this when you suspect mesh defects
        or when ``repair_mesh`` didn't fix the issue.

        Analyzes: self-intersections, inverted/inconsistent normals, degenerate
        (zero-area) faces, floating fragments, detailed hole reporting (count,
        size, location), and polygon count assessment for FDM printing.

        Returns a structured report with severity level, defect list, and
        actionable fix recommendations (specific MeshLab/Blender steps).

        Requires the optional ``trimesh`` package (``pip install trimesh``).
        Supports STL, 3MF, OBJ, PLY, OFF, GLB, and GLTF formats.  A 3MF
        holding several objects is read as one body — the report describes
        the whole plate.

        Use this BEFORE slicing to catch problems that would cause print
        failures or slicer errors.  Complements ``validate_generated_mesh``
        (basic checks) and ``analyze_printability`` (print-readiness scoring).

        Args:
            file_path: Path to a mesh file (STL, 3MF, OBJ, PLY, OFF, GLB,
                GLTF).
        

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": {
      "file_path": "<file_path>"
    },
    "name": "diagnose_mesh"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYesPath to a mesh file (STL, 3MF, OBJ, PLY, OFF, GLB, GLTF).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.1
    • addedInput schema / properties / file_path / description
      Added value: +"Path to a mesh file (STL, 3MF, OBJ, PLY, OFF, GLB, GLTF)."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds substantial context beyond them: an optional dependency requirement (trimesh), the full supported-format list, and the important caveat that a multi-object 3MF is analyzed as a single body. It also states what the response contains (severity level, defect list, actionable MeshLab/Blender fix steps), which annotations cannot convey.

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 core purpose and well-segmented into scope, comparison, analysis contents, returns, and prerequisites. The trailing "Args:" block duplicates the input schema verbatim and is the one clearly expendable passage.

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?

For a single-parameter read-only analysis tool with no output schema, the description covers dependency requirements, supported formats, multi-object semantics, the shape of the returned report, and placement in the pre-slicing workflow. An agent has everything needed to call it and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single parameter and schema description coverage is 100%, so the schema already documents file_path fully. The description's format list merely restates the same list, adding no new syntax, path-resolution, or size-limit guidance. Baseline 3 applies when the schema does all the work.

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 opens with a specific verb and resource ("Deep mesh defect analysis") and immediately enumerates the defect classes it covers (self-intersections, holes, normals, fragments). It explicitly distinguishes itself from siblings analyze_mesh_geometry, validate_generated_mesh, analyze_printability, and repair_mesh, so an agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

It gives explicit when-to-use triggers ("when you suspect mesh defects or when repair_mesh didn't fix the issue"), a sequencing rule ("Use this BEFORE slicing"), and names each alternative with the role it plays. Both positive selection and exclusion guidance are present.

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