Download a student's artwork images
artsonia_download_artworkDownloads full-resolution student artwork images into local folders, filtering by class/project, grade, or recent count. Supports metadata embedding and JSON sidecars for comments and feedback.
Instructions
Download full-resolution images of a student's artwork to a local folder, named from the artwork title/project/grade and time-stamped to the image's source date. Optionally filter by class/project (substring), grade, and/or keep only the most-recent N (the portfolio is reliably newest-first). Re-runs are idempotent (skip_existing). Runs immediately, with no confirmation step; writes only inside the allowed download folders. write_metadata:true also saves each artwork's comments + teacher feedback as a .json sidecar next to its image. embed_metadata:true embeds title/project/grade/date into each JPEG's EXIF/IPTC. path_template (e.g. "{grade}/{project}" or "{school_year}") organizes downloads into subfolders for multi-year archives. Note: descriptive filenames need each artwork's detail page (slower) — use filename_template "{artwork_id}" for the fast id-only path.
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": {
"artist_id": "<artist_id>",
"dest": "<dest>"
},
"name": "artsonia_download_artwork"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dest | Yes | Local destination folder (a leading ~ is expanded). Created if missing. Must be inside the allowed download folders: ARTSONIA_OUTPUT_DIR when set, otherwise ~/Downloads or ~/Pictures; anything else is refused before any download. On a hosted server nothing is written to disk and dest is only a label: images come back inline, any that do not fit come back as one signed zip link (`archive.url`), and any that cannot be delivered are listed in `omitted` by name with the reason. | |
| grade | No | Only artworks created in this grade, e.g. "6" or "Grade 6". | |
| limit | No | Keep only the N most recent matching artworks (portfolio is newest-first). | |
| project | No | Only artworks whose school-project/class name contains this (case-insensitive). | |
| artist_id | Yes | Student artist_id (from artsonia_list_students). | |
| resolution | No | Image resolution. "full" is the original (~0.7 MB each). | full |
| write_index | No | After downloading, write an index.json manifest into the destination folder listing the downloaded items (artwork_id, title, file, grade, project, date). Off by default. | |
| path_template | No | Optional subfolder pattern under dest, composed with filename_template — e.g. "{grade}/{project}" or "{school_year}" for multi-year archives. Same tokens as filename_template; segments are slugified like filenames and empty tokens collapse (no empty folders). Paths are deterministic, so skip_existing re-runs stay idempotent. {school_year} (July–June, e.g. "2021-2022") derives from the image's Last-Modified. | |
| skip_existing | No | Skip artworks whose target file already exists (idempotent re-runs). Set false to overwrite. | |
| embed_metadata | No | Embed each image's title/project/grade and source date (its Last-Modified, same as date_source) into the JPEG's EXIF (ImageDescription, DateTimeOriginal) and IPTC (title, keywords, date) so the metadata survives renames/moves and is searchable in Spotlight/Apple Photos. Needs each artwork's detail page (slower); applies to freshly downloaded files only (skipped files are left untouched). Off by default. | |
| write_metadata | No | After downloading, write a per-artwork <image-name>.json sidecar next to each image with the artwork's comments and teacher feedback (plus title/project/grade). Fetches each artwork's detail page + the student's feedback page. Off by default. | |
| include_private | No | Include artworks marked private in the portfolio. Set false to exclude them (excluded count is reported as private_excluded_count). | |
| filename_template | No | Filename pattern. Tokens: {title} {project} {grade} {date} {school_year} {artwork_id}. The artwork_id is auto-appended for uniqueness if absent. Use "{artwork_id}" for the fast id-only path (no detail fetch). | {grade} - {project} - {title} |
| set_mtime_from_source | No | Set each file's modified time from the image's Last-Modified header (its Artsonia upload date) instead of the download moment. |