manage_library
Scope: generate:media. Unified write surface for the user's library. Single tool that adds / renames / deletes both Asset Library entries (images, videos, audio in R2) and Gemini Omni Character entries (reference image + identity description). Reads stay on list_assets and list_gemini_omni_characters — call those first to confirm what exists.
ARGS:
action (required) — assets take add | rename | delete; characters take create | delete.
Asset args (used when kind='asset'):
name — handle for 'add' (lowercase letters/digits/_/-, max 64 chars, unique per user).
url — remote source for 'add' (server fetches; validates MIME type: jpeg / png / webp / mp4 / mov / mkv / webm / mp3 / wav / m4a / ogg / weba; 50 MB total + 500 MB-per-file quota).
shared — WHERE an 'add' lands for accounts with an active team: true = the shared team library, false = the personal library. This is the USER's choice, never yours: if the account has a team (the list_assets response carries a team block), ASK the user 'personal or team library?' BEFORE saving and pass their answer. Omitting shared on a team account returns shared_scope_required (with team_name) instead of saving — ask, then retry. Accounts with NO team: don't ask and don't pass it; the asset is always personal.
asset_id — UUID from list_assets for 'rename' or 'delete'.
new_name — new handle for 'rename' (same rules as name).
Character args (used when kind='character'):
descriptions — appearance / identity / style text for 'create'.
image_url — publicly accessible jpeg / png / webp for 'create'.
character_name — optional display name for 'create'.
voice_id — optional voice from list_gemini_omni_voices for 'create'.
character_id — UUID id field from list_gemini_omni_characters for 'delete' (NOT the provider's opaque character_id field).
Kling 4.0 library args (kind='kling_element' or 'kling_voice', actions create | delete). Saved entries show in the Kubeez studio's Kling 4.0 'Elements and voices' editor and come back from list_assets under kling_4_elements / kling_4_voices, ready to pass to generate_media's elements / voices on kling-4-0-* models (mention each as @name; Kling 4.0 Flash, kling-4-0-flash-*, takes saved elements but not saved voices):
name (required): 1-20 letters (no digits or underscores), unique across the user's Kling 4.0 elements AND voices; identifies the entry for 'delete'.
kling_element 'create': EITHER image_urls (2-4 public image URLs, the first is the main view: front face or main angle) OR video_url (one 3-8s single-shot character clip, MP4/MOV, uploaded to Kubeez via get_upload_url); optional tag (character, animal, prop, costume, scene, effect, others; a video element is always character), optional descriptions (max 100 chars), optional voice_url (reference audio bound to a character element). Max 7 saved elements.
kling_voice 'create': audio_url (public URL of a clear 5-30s voice recording; an element's voice_url follows the same 5-30s rule). Max 3 saved voices.
USE WHEN: stashing a recurring brand asset, freeing library quota, registering a new Gemini Omni character, or cleaning up. Creating a character (kind='character', action='create') is the FIRST step for any consistent-video request: a recurring spokesperson / mascot, a video series, or a marketing ad set that must keep the SAME person + voice across clips. Bind a voice_id so the voice is locked too, then reuse the saved character_id via character_ids / voice_id on each gemini-omni-video-* / gemini-omni-flash-* generate_media call (see kubeez://skills/model-selection). For destructive actions (delete), CONFIRM with the user first if they didn't explicitly ask — both deletes are irreversible. Past generations that already used the asset URL or character_id keep their outputs; only the library row (and R2 blob, for assets) disappears.
ERRORS: invalid_kind, invalid_action, missing_arg (per action), asset-specific: quota_exceeded, name_taken, unsupported_type, fetch_failed, shared_scope_required (team account + no shared — ask the user personal vs team, retry with their pick); character-specific: unsupported_image_type, invalid_voice_id.
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": {
"kind": "<kind>",
"action": "<action>"
},
"name": "manage_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| url | No | ||
| kind | Yes | ||
| name | No | ||
| action | Yes | ||
| shared | No | ||
| asset_id | No | ||
| new_name | No | ||
| voice_id | No | ||
| audio_url | No | ||
| image_url | No | ||
| video_url | No | ||
| voice_url | No | ||
| image_urls | No | ||
| character_id | No | ||
| descriptions | No | ||
| character_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||