Skip to main content
Glama

parts

Segment object details from image points or boxes with SAM 2.1, then measure each detail's size, position, area, holes, tilt, and color.

Instructions

Выделить детали объекта по своим точкам и рамкам (нейросеть SAM 2.1) и измерить каждую.

Посмотри на вид, поставь точку в середину детали (или несколько точек, или рамку box вокруг неё) — сервер вернёт маску детали цветом с номером и числа: размер и место в % рамки всего объекта, площадь, куски, отверстия, наклон длинной оси, цвет. Одна точка неоднозначна (деталь, её часть или весь объект) — если выделилось не то, добавь точки, рамку или точки exclude на соседних деталях и вызови снова с тем же именем.

Выделенные детали запоминаются: вид «путь|имя» (для листа «путь|N|имя») дальше работает с одной деталью в silhouette, contour (half — профиль детали), palette, mark, grid (percent — сетка по детали), align_views (одна деталь на разных видах). compare_parts — сравнение модели с референсом по деталям.

view: «путь», «путь|N» (кадр листа), «путь|0» или «путь|x1,y1,x2,y2». parts: до 12 деталей: [{"name": "чашка", "points": [[x, y]], "exclude": [[x, y]], "box": [x1, y1, x2, y2]}], координаты — пиксели оригинала. Надёжнее всего — 2–3 точки на детали и exclude на соседних деталях того же цвета; для одной точки есть pick: "small" | "medium" | "large". method: способ найти весь объект (для процентов), как в silhouette.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viewYes
partsYes
methodNoauto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does much of it: it discloses the ambiguity of a single point, the iterative retry loop, that segments are persisted and reusable via the 'path|name' view syntax, and what is returned (colored numbered mask plus size/position in % of the object frame, area, pieces, holes, long-axis tilt, color). It omits failure modes, cost/latency of the SAM model, and any permission or overwrite semantics.

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?

Well front-loaded: purpose first, then the point/box workflow, then persistence, then per-parameter detail. Length is justified by the tool's complexity, though it is a dense run-on block and partially restates the points/exclude/box semantics already present in the nested schema definitions.

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?

For a 3-parameter, nested-object tool with no annotations and no output schema, the description supplies the return contents, the retry protocol, and persistence behavior, so an agent has enough to invoke it correctly. It leaves method's accepted values and error behavior unaddressed.

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?

Top-level view/parts/method have no schema descriptions, and the description compensates well: it enumerates view forms ('path', 'path|N', 'path|0', 'path|x1,y1,x2,y2'), caps parts at 12, and fixes coordinates as original-image pixels. It adds little on method beyond deferring to silhouette, so a full 5 is not warranted.

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 opening sentence states a specific verb+resource+method: isolate an object's parts by points/boxes using SAM 2.1 and measure each. It then contrasts against siblings by naming silhouette, contour, palette, mark, grid, align_views and compare_parts and describing how a saved part feeds each. An agent can distinguish this from the whole-object tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Strong operational guidance: place a point in the part center (or several points, or a box), and if the wrong region is isolated, add points/box/exclude and re-call with the SAME name. It also states the most reliable recipe (2-3 points plus exclude on same-colored neighbors) and the pick fallback for a single point. It never explicitly says when to prefer silhouette or another sibling instead, so the when-not side is only implied.

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