roboflow_upload_annotation
Upload annotations in COCO, YOLO, Pascal VOC, CreateML, or Roboflow JSON format to associate them with specific images in a Roboflow project.
Instructions
Attach an annotation to an image.
Supported formats (annotation_format literal):
"coco""yolo"(YOLOv5/v8/v11-compatible .txt)"pascal_voc"(XML)"createml"(Apple CreateML JSON)"roboflow_json"
Pass annotation as a string (raw file contents) or a dict
(Python object; we serialize to JSON). Optional labelmap
is a class-id to name map Roboflow uses for YOLO formats.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>",
"image_id": "<image_id>",
"annotation": "<annotation>",
"annotation_format": "<annotation_format>"
},
"name": "roboflow_upload_annotation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| project | Yes | ||
| image_id | Yes | ||
| labelmap | No | ||
| workspace | No | ||
| annotation | Yes | ||
| annotation_format | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |