Skip to main content
Glama

Moltline Vision Maths

Detection Metrics

detection_metrics
Read-onlyIdempotent

Score detections against ground truth and show the working. PREMIUM (license).

Greedy matching at the IoU threshold, highest-confidence prediction first, each ground-truth box matched at most once - the standard protocol. Reports per-class precision, recall and F1, and average precision by the all-points interpolation used by Pascal VOC 2010 onward. Typical input {"predictions": [{"box": [0,0,10,10], "label": "cat", "score": 0.9}], "ground_truth": [{"box": [1,1,11,11], "label": "cat"}]} returns {"overall": {"tp": 1, "fp": 0, "fn": 0, "precision": 1.0, "recall": 1.0, "f1": 1.0}, "per_class": {...}, "mAP": 1.0}.

Use to compare two models on the same held-out set. Not for cleaning up a single model's overlapping output first - run nms before this. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "ground_truth must contain at least one box"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
box_formatNo"voc", "coco" or "yolo". Default "voc".voc
image_widthNoPixel width; required for yolo boxes.
predictionsYesPredicted boxes, each {"box": [...], "label": ..., "score": ...}. Score defaults to 1.0 when omitted.
ground_truthYesTrue boxes, each {"box": [...], "label": ...}.
image_heightNoPixel height; required for yolo boxes.
iou_thresholdNoOverlap at which a prediction counts as a match. Default 0.5, the usual reporting threshold.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.9/5.0
Behavior5/5

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

The description goes beyond the annotations by disclosing the matching algorithm (greedy matching at IoU threshold, highest-confidence first, each ground-truth box matched at most once), the interpolation method (all-points interpolation used by Pascal VOC 2010 onward), and the error handling behavior (never raises a protocol error, returns an error object). It also confirms the read-only and idempotent nature, which aligns with the annotations. This adds significant behavioral context beyond what the annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded. It starts with a clear one-sentence purpose, then explains the algorithm, provides a concrete example, gives usage guidance, and ends with error handling. Every sentence adds value, and the structure is logical. It is concise yet comprehensive, with no wasted words.

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?

Given the tool's complexity (6 parameters, matching algorithm, error handling), the description is remarkably complete. It covers the purpose, algorithm, input format, output format, usage guidance, error behavior, and safety (read-only, idempotent). The output schema exists, so the description doesn't need to explain return values in detail, but it provides a concrete example. This is a fully self-contained description that leaves no major gaps.

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?

The schema description coverage is 100%, so the schema already documents all parameters. The description adds value by explaining the typical input format and the default behavior (e.g., score defaults to 1.0 when omitted, iou_threshold default 0.5). It also clarifies the box_format parameter by mentioning the default 'voc' and that image_width/height are required for yolo boxes. However, it doesn't add much beyond what the schema already states, so a 4 is appropriate.

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 clearly states the tool's purpose: 'Score detections against ground truth and show the working.' It specifies the exact operation (scoring detections against ground truth) and the resource (detections and ground truth). It distinguishes itself from siblings by explicitly noting it is not for cleaning up overlapping output (that's nms) and by mentioning the PREMIUM license, which sets it apart from other tools in the set.

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 usage guidance: 'Use to compare two models on the same held-out set. Not for cleaning up a single model's overlapping output first - run nms before this.' This clearly states when to use the tool and when not to, and even names the alternative tool (nms). This is a model example of usage guidelines.

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