Skip to main content
Glama

detect_mesh_pockets

Read-only

Detect recessed pockets and cavities in an STL mesh before multi-part composition, returning each pocket's dimensions and position so you can size overlay geometry correctly.

Instructions

Detect pockets and cavities in a mesh before multi-part composition.

        Analyzes a base model to find recessed regions (circular or rectangular
        pockets) on top and bottom faces. Call this before compose_models or
        multi_material_print to know pocket dimensions for overlay geometry.

        :param file_path: Path to the STL file to analyze.
        :param min_depth_mm: Minimum pocket depth to report (default 0.3mm).
        :returns: Dict with pocket list, dimensions, and positions.
        

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": "detect_mesh_pockets"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYesPath to the STL file to analyze.
min_depth_mmNoMinimum pocket depth to report (default 0.3mm). Default: 0.3.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.1
    • addedInput schema / properties / file_path / description
      Added value: +"Path to the STL file to analyze."
    • changedInput schema / properties / min_depth_mm / description
      Previous value: -"Default: 0.3."New value: +"Minimum pocket depth to report (default 0.3mm). Default: 0.3."
  2. Changed2 schema fields changedv1.5.0
    • removedInput schema / properties / min_depth_mm / default
      Removed value: -0.3
    • addedInput schema / properties / min_depth_mm / description
      Added value: +"Default: 0.3."
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered and the description is not required to restate it. The description still adds real behavioral context: which faces are scanned (top and bottom), what kinds of features are reported, and how many the result carries. It does not mention tolerances, performance limits, or behavior when no pockets are found, which keeps it short of a 5.

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?

The core purpose and the call-ordering advice are front-loaded in the first two sentences, which is the right structure. The trailing :param: lines duplicate the schema descriptions word for word and could be dropped without loss, a minor redundancy rather than a structural problem.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only two parameters, no output schema and annotations already covering the safety profile, the description gives enough: input, scope, workflow position, and an outline of the return value (pocket list, dimensions, positions). Nothing essential is missing for correct invocation, though edge-case behavior (no pockets detected, malformed STL) is unspecified.

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 both file_path and min_depth_mm are already documented with type, default and meaning in the schema. The description's :param: lines repeat that information verbatim rather than adding format details (e.g. STL variants accepted, unit assumptions). Baseline 3 applies when the schema does the heavy lifting.

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?

"Detect pockets and cavities in a mesh" gives a specific verb and resource, and the description narrows scope to recessed regions (circular or rectangular pockets) on top and bottom faces. That is far more specific than siblings like analyze_mesh_geometry or diagnose_mesh, so an agent can distinguish it without opening the 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?

It states the exact point in the workflow where this belongs — "Call this before compose_models or multi_material_print" — and explains the reason (to know pocket dimensions for overlay geometry). Two named sibling alternatives plus the selecting condition is explicit routing guidance.

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