facenest_pick_best_photos
Ranks and returns the top N photos from a single album, folder, person, tag, or date by measured smile or image sharpness; read-only and writes nothing to the library.
Instructions
Pick the Top-N photos from ONE scope (read-only; nothing is written to the library). mode:'smile' (default) ranks faces by measured smile; mode:'sharpness' ranks whole-image sharpness and needs NO face — use it for landscape / food / architecture / PPT material. Smile mode: optional scope.person (cluster_id, exact person_name, or object {cluster_id|person_name|name}) intersects ANY scope with that person and measures only their face, e.g. an album ∩ one person. cluster_id wins if both are given (person_note says so); unknown keys inside person return 400. scope.kind: album / folder / person / favorites / tag / date / smart_album / image_ids; for semantic results, call facenest_semantic_search first and pass its ids as image_ids (the picker does not run the semantic model). Sharpness mode is measured exactly like the album UI's 'Sort by sharpness' (Laplacian variance, longest edge 800 px); it rejects scope.person and accepts aspect ('any'|'16:9'|'4:3'|'3:2'|'1:1'|'9:16'|'4:5', ±8% of width/height) to filter PPT-friendly framing before scoring. Sharpness is only a RELATIVE ranking within this batch and does NOT detect a photo that is rotated 90° in its pixels; photos without EXIF Orientation cannot be auto-uprighted. Before delivery, inspect the returned thumb_url_abs visually (or tell the user to). There is NO aesthetic mode — beauty is subjective and has no reliable local score. quality is accepted as an ALIAS for sharpness (it is the video picker's word); on photos it is exactly the same Laplacian metric, NOT a third algorithm. top 1..20; wait_sec 0..60 bounds one call; sharpness is capped at 1,200 photos per scope (smile at 3,000) and the reply's truncated/note says so. Returns {status:'done'|'partial', mode, best:[{image_id, display_name, smile|sharpness, smile_bucket?, face_id?, face_px?, thumb_url, thumb_url_abs, source_path, taken_at, width, height, aspect_ratio, source}], total, total_scope, measured_cap, truncated, scored, pending, cached, computed, empty_reason, job_id, eta_sec, note}. If status is 'partial', call again with the same job_id (and a larger wait_sec) to finish; the work is cached, so a second call over the same scope is a read (see cached). smile=null means 'not measurable' (face smaller than 64 px), not 'not smiling'. refresh=true ignores the cache and recomputes (sharpness cache too).
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": {
"scope": "<scope>"
},
"name": "facenest_pick_best_photos"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| mode | No | smile = face ranking (needs faces); sharpness = whole-image sharpness, no face needed; quality = the video picker's word, accepted as an ALIAS for sharpness (same algorithm, not a third mode). | smile |
| scope | Yes | ||
| aspect | No | sharpness mode only: keep photos whose width/height is within ±8% of this ratio (PPT / video framing). | |
| job_id | No | ||
| refresh | No | ||
| wait_sec | No | ||
| min_face_px | No |