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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations: it discloses the deterministic tie-breaking behavior ('Ties break on the earlier index'), the exact error contract ('never raises a protocol error — it returns {"error": ...}'), and the idempotency/retry safety. It also reinforces readOnlyHint=true and idempotentHint=true with concrete retry guidance. This adds substantial value beyond what annotations declare.

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 description is dense but appropriately so: every sentence carries semantic weight (algorithm, determinism, example, error behavior, safety). The example JSON is the only 'bulk' and it earns its space by illustrating input and output simultaneously. Slightly long, but nothing is wasted.

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 tool with an output schema and strong annotations, the description covers everything an agent needs: algorithm semantics, determinism, error handling, safety guarantees, and sibling differentiation. The presence of an output schema means return-value documentation is unnecessary here. No gaps identified.

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 the baseline is 3. The description provides a worked input/output example that illustrates the boxes/scores relationship but doesn't add syntax or format details beyond the schema's own excellent parameter documentation. The schema remains the primary source for parameter semantics.

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 opens with a specific verb+resource ('Remove duplicate detections of the same object') and then details the exact greedy algorithm (keep highest-scoring box, drop overlaps above threshold). It explicitly differentiates from siblings by naming detection_metrics and bbox_convert as different purposes. This is a model of purpose clarity.

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 provides explicit when-to-use ('Use after a detector that emits overlapping boxes') and, crucially, when-not-to-use guidance with named alternatives ('Not for scoring against ground truth (detection_metrics) and not for format changes (bbox_convert)'). This satisfies the highest bar for usage guidance.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each of the six tools addresses a clearly distinct operation: bbox_convert handles format transforms, nms removes duplicate detections, detection_metrics evaluates predictions, image_probe reads headers, resize_plan computes resize parameters, and colour_check checks WCAG contrast. There is no overlap or ambiguity between them.

Naming Consistency3/5

Most tools follow a noun_verb pattern (bbox_convert, colour_check, image_probe, resize_plan) but two are outliers: detection_metrics is noun_noun and nms is an acronym. Naming is readable but not fully consistent across the set.

Tool Count5/5

Six tools is a well-scoped count for a vision/maths utilities server. Each tool covers a distinct, necessary facet of computer vision workflows (conversion, suppression, metrics, probing, planning, contrast), with no apparent bloat or trivial tools.

Completeness4/5

The tool surface covers the core calculation needs for bounding-box-based vision tasks: conversion, NMS, evaluation, image metadata, resize planning, and accessibility contrast. Missing features like actual image manipulation or geometric transforms are outside the stated 'maths' scope, so coverage is strong. One could argue for a tool that applies resize to boxes, but resize_plan already returns the transform parameters, which is sufficient.

Resources