Skip to main content
Glama

Moltline Vision Maths

Nms

nms
Read-onlyIdempotent

Remove duplicate detections of the same object. PREMIUM (license).

Greedy non-maximum suppression: keep the highest-scoring box, drop everything overlapping it above the threshold, repeat. Ties break on the earlier index, so the result is deterministic rather than dependent on sort stability. Typical input {"boxes": [[0,0,10,10],[1,1,11,11],[50,50,60,60]], "scores": [0.9, 0.8, 0.7]} returns {"keep": [0, 2], "suppressed": [{"index": 1, "by": 0, "iou": 0.6807}], "kept": 2}.

Use after a detector that emits overlapping boxes. Not for scoring against ground truth (detection_metrics) and not for format changes (bbox_convert). Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "boxes and scores must be the same length"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

NameRequiredDescriptionDefault
boxesYesCandidate boxes in box_format, e.g. [[0, 0, 10, 10]].
scoresYesOne confidence per box, same order and same length as boxes.
box_formatNo"voc", "coco" or "yolo". Default "voc".voc
image_widthNoPixel width; required for yolo boxes.
image_heightNoPixel height; required for yolo boxes.
iou_thresholdNoOverlap above which the lower-scoring box is dropped. Default 0.5.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: it documents the tie-breaking rule and determinism guarantee, the premium license requirement, and a precise error contract (never raises a protocol error; returns {"error": ...}) plus the safe-retry implication. These are exactly the behavioral traits annotations cannot express.

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?

Front-loaded with purpose and algorithm, then example, then usage and error handling — a sensible order with little filler. The sample return value partly duplicates the output schema, which is the only reason it falls short of a 5.

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 6-parameter algorithmic tool with a full output schema, the description covers purpose, algorithm, determinism, licensing, error behavior, and sibling routing. Return values are explained by the output schema, so the example is a bonus rather than a gap-filler; nothing an agent needs to call this correctly is missing.

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 coverage is 100%, so the baseline is 3; the description earns more by supplying a concrete worked input and by surfacing a cross-parameter constraint the schema cannot state ("boxes and scores must be the same length"). It does not mention box_format, image_width/height, or the meaning of iou_threshold beyond "the threshold", leaving those entirely to 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?

Opens with a specific verb and resource ("Remove duplicate detections of the same object") and immediately names the algorithm (greedy non-maximum suppression) so an agent knows exactly what operation this is. It also distinguishes itself from the siblings bbox_convert and detection_metrics by name, so no schema inspection is needed to tell them apart.

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?

"Use after a detector that emits overlapping boxes" gives a positive trigger, and "Not for scoring against ground truth (detection_metrics) and not for format changes (bbox_convert)" gives explicit exclusions mapped to the correct alternatives. This is a full when/when-not/alternative routing statement.

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.