Skip to main content
Glama

Export a dataset

export_dataset
Idempotent

Export selected images as one training dataset in COCO, YOLO, or QuPath format, with a shared class list so label IDs stay consistent across images.

Instructions

Export several images as ONE training dataset, with one class list so ids mean the same everywhere.

Choose the images by category (case-insensitive) or image_ids (up to 100). coco: one COCO file for all images; yolo: classes plus a label file per image, named after it; qupath: a GeoJSON file per image. classes fixes the class order; other labels follow in first-seen order. With output_dir (a folder on the machine running this server; not available when hosted) the files are written there and only a summary is returned, which suits large datasets such as nuclei.

Input Schema

NameRequiredDescriptionDefault
formatNo'coco' (COCO JSON), 'yolo' (YOLO labels and classes) or 'qupath' (QuPath GeoJSON, nuclei as detections).coco
classesNoClass names in the order to number them; other labels follow in first-seen order.
categoryNoExport every image in this category (case-insensitive); give this or image_ids.
image_idsNoExport these images (up to 100); give this or category.
output_dirNoFolder on the machine running this server to write the files to (not when hosted); omit to return them.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.8.1
    • addedInput schema / properties / category / description
      Added value: +"Export every image in this category (case-insensitive); give this or image_ids."
    • addedInput schema / properties / classes / description
      Added value: +"Class names in the order to number them; other labels follow in first-seen order."
    • addedInput schema / properties / format / description
      Added value: +"'coco' (COCO JSON), 'yolo' (YOLO labels and classes) or 'qupath' (QuPath GeoJSON, nuclei as detections)."
    • addedInput schema / properties / image_ids / description
      Added value: +"Export these images (up to 100); give this or category."
    • addedInput schema / properties / output_dir / description
      Added value: +"Folder on the machine running this server to write the files to (not when hosted); omit to return them."
  2. Addedv0.8.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, idempotentHint=true, so the safety profile is already carried; the description adds genuinely new context: files are written to a folder on the server machine, that option is unavailable when hosted, and only a summary is returned in that case. It does not cover the returned-payload-vs-files tradeoff beyond that or any size/perf limits besides the 100-image cap.

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 the core purpose, then format/selection/output details in a compact block. Some phrasing duplicates schema descriptions (classes ordering, output_dir folder semantics), but each clause still carries operational information rather than filler.

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?

An output schema exists, so return values needn't be spelled out, and the description still notes that only a summary comes back when writing to disk. The one gap is that with zero required parameters, the behavior when neither category nor image_ids is given (error? export all?) is never stated.

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 baseline is 3, but the description adds meaning beyond the schema: how classes fixes numbering and that other labels follow first-seen order, what each format produces ('one COCO file for all images', 'a label file per image, named after it'), and the hosted-server restriction on output_dir. Only the all-optional default case is left unexplained.

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?

States a specific verb and resource with its defining scope: 'Export several images as ONE training dataset, with one class list so ids mean the same everywhere.' The three output formats are named, and the distinction from export_annotations is implicit in the resource (multi-image dataset vs annotations) and made concrete by the format list.

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?

Gives clear selection guidance ('by category (case-insensitive) or image_ids (up to 100)') and a situational recommendation ('output_dir ... suits large datasets such as nuclei'). It does not name a sibling alternative or state what happens when neither category nor image_ids is supplied, so it stops short of full when/when-not coverage.

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