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
okNoTrue when every feature meshed successfully.
boundsNoOverall model bounding box.
featuresNoPer-feature summary — never includes raw mesh arrays.
diagnosticsNoKernel diagnostics, if any.
featureCountNoNumber of features in the meshed model.
failedFeatureIdsNoFeature ids that failed to compile (empty when ok).

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly/destructive hints, the description discloses that meshing runs the full server-side OCCT pipeline, that params act as stateless slider recompute overrides, that raw vertex/index/normal arrays are never returned, and that ok becomes false when any feature fails to compile. This gives the agent a clear model of side effects and failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured with clear INPUT/OUTPUT sections and every sentence adds value. The core behavior and output shape are front-loaded before usage guidance and alternatives, making it easy for an agent to scan.

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 the tool's moderate complexity, the output schema, and annotations, the description is complete: it covers input requirements, output structure, failure semantics, stateless behavior, what is intentionally not returned, and which sibling tools to use for different goals. An agent has everything needed to select and invoke it correctly.

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

Parameters4/5

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

Schema description coverage is already 100%, and the schema gives solid descriptions for source, fileName, and params. The prose adds useful operational nuance, such as fileName being diagnostic-only and params being applied as stateless overrides before meshing, but most parameter meaning is already present in the schema.

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 names a specific verb ('Mesh'), a concrete resource (a kernelCAD .kcad.ts source), and the exact deliverable (compact geometry summary with bounds and per-feature id/kind/triangleCount/bbox). It also positions itself against render-oriented siblings by explicitly saying raw arrays are never returned.

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?

The description gives explicit use cases: inspect a model without a viewer, confirm part size/shape, check triangle counts, and verify every feature produced geometry. It also names alternatives for rendering (open_in_studio and get_latest_render), and explains when this tool is preferred over the legacy client worker.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.