Skip to main content
Glama
amanharshx
by amanharshx

dataset_class_stats

Read-only

Get per-class annotation counts for any Ultralytics dataset by slug or URI. Summarizes bulky histogram/heatmap groups by default, with optional full payload.

Instructions

Get per-class annotation counts for a dataset by slug, owner/slug, or a ul://owner/datasets/slug URI. By default omits the bulky histogram and heatmap groups (image size, file size, format, points-per-annotation, bbox distributions, and location/dimension heatmaps), naming them in the summary; pass include_histograms: true to get the full payload unmodified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetYesDataset ref by slug, owner/slug, or a ul://owner/datasets/slug URI.
include_histogramsNoInclude the histogram and heatmap groups omitted by default (image size, file size, format, points-per-annotation, bbox distributions, and location/dimension heatmaps). Off by default because the payload is large; the summary names the groups it omits.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.13
    • changedInput schema / properties / dataset / description
      Previous value: -"Dataset ref by slug, owner/slug, or ul:// URI."New value: +"Dataset ref by slug, owner/slug, or a ul://owner/datasets/slug URI."
    • addedInput schema / properties / include_histograms / description
      Added value: +"Include the histogram and heatmap groups omitted by default (image size, file size, format, points-per-annotation, bbox distributions, and location/dimension heatmaps). Off by default because the payload is large; the summary names the groups it omits."
  2. Addedv0.1.12

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 and destructiveHint=false, while the description adds valuable behavioral detail: the default response omits bulky histogram/heatmap groups, names them in the summary, and explains that include_histograms=true returns the full payload unmodified. This goes beyond the structured annotations and helps the agent anticipate payload size and result shape.

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?

Two focused sentences: the first states the core purpose and input formats; the second explains the default omission and the escape hatch. No filler or repetition of schema content appears.

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 read-only, two-parameter tool with no output schema, the description covers the essential invocation details: what the tool returns, how to identify the dataset, and the optional flag's effect. An agent has enough information to call it correctly without additional guidance.

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% and both parameter descriptions are already clear about dataset ref formats and the include_histograms behavior. The description reinforces these details but does not substantially add new meaning beyond the schema, which is expected when coverage is complete.

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 uses a specific verb and resource: it gets per-class annotation counts for a dataset and lists the accepted reference formats (slug, owner/slug, ul:// URI). It clearly differs from sibling tools like datasets_get or explore_datasets, so an agent can tell what this tool is for without inspecting other definitions.

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?

It provides clear context for when to use the tool: when per-class annotation counts are needed, and it explains the dataset reference formats. It does not explicitly name alternatives or state when not to use this tool, but its purpose is specific enough that implied usage is strong.

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