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

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

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

A4.6/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly/destructive/openWorld), and the description adds substantial context beyond them: it runs the full server-side OCCT pipeline (not the legacy client worker), it supports modern sources, it states failure semantics (ok=false and failedFeatureIds lists non-compiling features), and it explicitly guarantees raw vertex/index/normal arrays are never returned.

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?

Purpose is front-loaded, then INPUT and OUTPUT are cleanly delineated, and the routing note is placed at the end. It is somewhat long and the params/fileName lines duplicate the schema, but no sentence is wasted given the tool's complexity.

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 tool with an output schema, nested params, and annotations, the description covers purpose, usage routing, failure semantics, and the exact output shape. An agent has everything needed to call it correctly and interpret the result; nothing material is missing.

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?

Schema description coverage is 100%, so all three parameters are already documented. The description's INPUT section largely restates the schema (source text, fileName diagnostic label, params stateless slider override) with minimal added meaning, so the 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 (mesh/summarize) and resource (.kcad.ts source → geometry summary) and enumerates exactly what the return contains (overall bounds, per-feature id/kind/triangle count/bbox). It clearly distinguishes itself from siblings like get_model_mesh and open_in_studio, so an agent can select it without opening another 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 explicit when-to-use cases (inspect geometry without a viewer, confirm size/shape, count triangles per feature, verify every feature produced geometry) and names the alternatives with the condition that selects them: open_in_studio to SEE the render, get_latest_render only for alternate views.

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.