Skip to main content
Glama

Summarize Mesh Geometry

mesh_summary
Read-only

Mesh a kernelCAD .kcad.ts source server-side and return a COMPACT geometry summary — overall bounds plus, per feature, its id, kind, triangle count, and bounding box.

Use this to INSPECT a model's geometry without a viewer: confirm a part is the size/shape you expect, see how many triangles each feature contributes, or check that every feature produced geometry. This runs the full server-side OCCT pipeline (the same one the Studio renderer uses), so it evaluates modern sources (assembly, path, .material, …) that the legacy client worker cannot.

INPUT: source (required) the .kcad.ts script text; fileName (optional) a label for diagnostics; params (optional) a map of parameter-name → number overrides applied before meshing (stateless slider recompute).

OUTPUT: { ok, bounds, featureCount, features: [{ id, kind, triangleCount, bbox: { min:[x,y,z], max:[x,y,z] } }], failedFeatureIds, diagnostics }. ok is true when every feature meshed; failedFeatureIds lists features that failed to compile (and ok is then false). Raw vertex/index/normal arrays are NEVER returned — this is a summary only. To SEE the rendered model, call open_in_studio (includes PNG preview + viewer); use get_latest_render only for alternate views.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsNoOptional map of parameter-name → numeric value, applied as overrides before meshing (stateless slider recompute).
sourceYesThe .kcad.ts script source to mesh.
fileNameNoOptional file-name label used in diagnostics (does not affect geometry).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / properties
      Removed value: -{
      -  "bounds": {
      -    "description": "Overall model bounding box.",
      -    "properties": {
      -      "max": {
      -        "items": {
      -          "type": "number"
      -        },
      -        "type": "array"
      -      },
      -      "min": {
      -        "items": {
      -          "type": "number"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  "diagnostics": {
      -    "description": "Kernel diagnostics, if any.",
      -    "items": {},
      -    "type": "array"
      -  },
      -  "failedFeatureIds": {
      -    "description": "Feature ids that failed to compile (empty when ok).",
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  "featureCount": {
      -    "description": "Number of features in the meshed model.",
      -    "type": "number"
      -  },
      -  "features": {
      -    "description": "Per-feature summary — never includes raw mesh arrays.",
      -    "items": {
      -      "properties": {
      -        "bbox": {
      -          "properties": {
      -            "max": {
      -              "items": {
      -                "type": "number"
      -              },
      -              "type": "array"
      -            },
      -            "min": {
      -              "items": {
      -                "type": "number"
      -              },
      -              "type": "array"
      -            }
      -          },
      -          "type": "object"
      -        },
      -        "id": {
      -          "type": "string"
      -        },
      -        "kind": {
      -          "type": "string"
      -        },
      -        "triangleCount": {
      -          "type": "number"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "ok": {
      -    "description": "True when every feature meshed successfully.",
      -    "type": "boolean"
      -  }
      -}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "bounds": {
      +      "description": "Overall model bounding box.",
      +      "properties": {
      +        "max": {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        },
      +        "min": {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "diagnostics": {
      +      "description": "Kernel diagnostics, if any.",
      +      "items": {},
      +      "type": "array"
      +    },
      +    "failedFeatureIds": {
      +      "description": "Feature ids that failed to compile (empty when ok).",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "featureCount": {
      +      "description": "Number of features in the meshed model.",
      +      "type": "number"
      +    },
      +    "features": {
      +      "description": "Per-feature summary — never includes raw mesh arrays.",
      +      "items": {
      +        "properties": {
      +          "bbox": {
      +            "properties": {
      +              "max": {
      +                "items": {
      +                  "type": "number"
      +                },
      +                "type": "array"
      +              },
      +              "min": {
      +                "items": {
      +                  "type": "number"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "triangleCount": {
      +            "type": "number"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "ok": {
      +      "description": "True when every feature meshed successfully.",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.