Skip to main content
Glama

diagnose_mesh

Read-only

Analyze mesh files for self-intersections, holes, inverted normals, and floating fragments before slicing, then get severity ratings and actionable repair recommendations.

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: Kiln's own repair where it handles
        the defect, specific MeshLab/Blender steps where it does not.
        ``report.closure`` says whether the surface is closed and every
        edge of each piece shared by exactly two of its triangles, in the
        same words ``validate_and_prepare_mesh`` uses.

        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.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=false), and the description adds real context beyond them: an optional trimesh dependency that must be installed, the accepted formats, the multi-object 3MF caveat ('read as one body'), the shape of the returned report, and precise semantics for report.closure. The only shortfall is that the exact severity levels and the size of the defect list are not bounded.

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 distinguishing claim and alternative routing, then details, then dependencies. Slightly bloated: the supported-format list appears twice (body and Args), and the trimesh install note could be one clause, but nearly every sentence carries actionable information.

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, formats, multi-object behavior, return structure and remediation output, plus placement in the wider validate/analyze/repair 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 required parameter with 100% schema coverage, so the schema already documents it fully. The description restates the format list for file_path verbatim in the Args block rather than adding constraint information such as size limits or how a nonexistent or corrupt path is reported, so it adds no meaning beyond the schema. Baseline 3 applies.

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?

States a specific verb+resource ('Deep mesh defect analysis') and enumerates exactly the defect classes it covers: self-intersections, holes, normals, fragments, degenerate faces, polygon count. It explicitly contrasts itself with analyze_mesh_geometry ('printability scoring and overhang detection'), so an agent can distinguish it from that sibling without opening either 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?

Gives positive triggers ('when you suspect mesh defects', 'repair_mesh didn't fix the issue', 'BEFORE slicing'), names the alternatives it complements (validate_generated_mesh, analyze_printability), and states which sibling covers the adjacent use case. Both when-to-use and when-another-tool-fits 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