Tools for agents: Triangle mesh inspector

Measure surface area and inspect mesh edges, winding, duplicate triangles, degenerate faces and unused vertices.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-mesh-inspect/mcp"
    }
  }
}
Streamable HTTP · No API key · Stateless

Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.

Call inspect_triangle_mesh

Triangles use zero-based integer indices. Coordinates determine units: area is in squared coordinate units. This inspects triangle meshes only; triangulate polygons first. Duplicate triangles are reported regardless of winding and still contribute to the total area. Degeneracy means exactly zero computed area or repeated indices; no near-zero tolerance is assumed. Edge closure and consistent winding do not establish a valid watertight solid: self-intersections and non-manifold vertices are not tested. No geometry is changed.

Input and output schemas
{
  "name": "inspect_triangle_mesh",
  "title": "Triangle mesh inspector",
  "description": "Measure triangle surface area and report boundary, over-shared and inconsistently wound edges, degenerate faces, duplicate faces and unused vertices. Does not certify solid validity.",
  "inputSchema": {
    "properties": {
      "vertices": {
        "items": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "type": "array"
        },
        "title": "Vertices",
        "type": "array"
      },
      "triangles": {
        "items": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "integer"
            },
            {
              "type": "integer"
            },
            {
              "type": "integer"
            }
          ],
          "type": "array"
        },
        "title": "Triangles",
        "type": "array"
      }
    },
    "required": [
      "vertices",
      "triangles"
    ],
    "title": "inspect_triangle_meshArguments",
    "type": "object"
  },
  "outputSchema": {
    "additionalProperties": true,
    "title": "inspect_triangle_meshDictOutput",
    "type": "object"
  },
  "icons": null,
  "annotations": {
    "title": null,
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "meta": null,
  "execution": null
}

Run the example to see the actual result.

HTTP alternative

POST https://app.getsupers.com/sites/agent-mesh-inspect/call
Content-Type: application/json

{
  "vertices": [
    [
      0,
      0,
      0
    ],
    [
      1,
      0,
      0
    ],
    [
      1,
      1,
      0
    ],
    [
      0,
      1,
      0
    ]
  ],
  "triangles": [
    [
      0,
      1,
      2
    ],
    [
      0,
      2,
      3
    ]
  ]
}

The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.

Triangle mesh: area, edge winding and diagnostic limits

Read the explanation

The saved triangle mesh example places four vertices at the corners of a unit square in the z equals zero plane. The first triangle is zero, one, two; the second is zero, two, three. Follow the diagonal from the bottom left corner to the top right. Each right triangle has perpendicular side lengths one and one, so half the cross product magnitude gives area one half. Adding both faces yields surface area one square coordinate unit. Changing coordinate units changes area units squared. This calculation follows the saved input and the documented mesh contract; this offline preview does not call the remote HTTP or MCP tool and does not claim an actual service response. Now inspect how faces traverse their shared diagonal. Triangle zero, one, two closes along two to zero. Triangle zero, two, three starts along zero to two. These directions oppose each other, so the shared edge has consistent winding. The other four square sides belong to only one face each, giving four boundary edges. This is an open sheet, not a closed solid. Reversing the second triangle to zero, three, two makes both faces traverse the diagonal from two to zero. Their areas stay one half, but the shared edge becomes inconsistently wound. Geometry and orientation answer different questions: a correct total area does not prove a closed, consistently oriented surface. The inspector also reports repeated or zero-area faces, duplicate triangles and unused vertices. Append another copy of zero, one, two: the documented contract treats it as a duplicate regardless of winding, and still includes its one-half area in the total. The displayed example would therefore sum to one and one half square units, rather than deduplicating itself. A face such as zero, zero, one is degenerate through repeated indices. A fifth vertex referenced by no triangle is unused. These diagnostics do not change geometry. Degeneracy uses exactly zero computed area, with no near-zero tolerance assumed. Even edge closure and consistent winding cannot certify a watertight solid: self-intersections and non-manifold vertices are outside this tool contract.

Triangle Mesh Topological Edge Inspection and Area Computation

How does this mesh inspector detect boundary edges, over-shared non-manifold edges, and inconsistent face winding?

This tool examines triangle connectivity and surface geometry from vertex coordinates and zero-based index triplets. It evaluates 2-manifold edge topology by counting how many triangles share each unordered vertex pair, and inspects orientation by checking whether sharing faces traverse that edge in opposite directions.

The inspection operates strictly on edge incidences and exact arithmetic: edge closure and consistent winding do not guarantee a watertight, non-self-intersecting 3D volume. Non-manifold vertices (such as two cones touching at a single apex) and intersecting faces are not evaluated, and duplicate faces are counted into the total surface area.

Try a worked example

Leaving the preset four-vertex, two-triangle quad in the JSON arguments input and clicking "Run tool" triggers inspect_triangle_mesh. The structured result returns a surface_area of 1.0 (each triangle having area 0.5), reports four boundary_edges with one face usage each, zero over_shared_edges, zero inconsistent_winding_edges, and sets edge_closed_and_consistent to false due to the open outer boundary.

Edge Incidence and Manifold Topology

In a 2-manifold triangle surface without boundary, every edge must be shared by exactly two faces. When an edge appears in only one triangle, the tool flags it under boundary_edges. If an edge is shared by three or more triangles, it is classified under over_shared_edges (non-manifold edge).

Orientation Consistency and Face Area Calculation

For two adjacent triangles to share a consistent surface normal orientation, their directed traversal across the shared edge must be in opposite orders: one face visits (v1, v2) while the other visits (v2, v1). If both faces traverse the edge in identical directed order, the edge is recorded in inconsistent_winding_edges. Individual triangle areas are computed using half the norm of the vector cross product of two edge vectors.