Import Library links
import_library_contentA local file uses create_library_upload_session, even without an attachment. Do not ask them to attach it in the chat. Import public Google Drive MP4/PDF file links as flat Library drafts. Pass individual file links; never pass a folder URL. Processing continues in the background. Poll get_library_upload_status until each item is ready, unavailable, or failed, then inspect or open it. For MP4s, ask the user: “Would you like to upload your videos as they are, or create new versions with Trainn AI? If you would like Trainn AI to create them, how should the videos turn out?” Wait for the answer unless the user already supplied their choice and instructions. A request describing the desired result chooses agentic_enhance; pass it as input_prompt. Collect instructions if missing. One prompt applies to every video; accept freeform instructions even if some edits are unsupported. Upload original uses preserve_original without input_prompt. Do not ask for PDFs. Publish only on request. Each result identifies its zero-based source_index. Keep accepted handles; retry only failed sources.
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": {
"idempotency_key": "<idempotency_key>",
"sources": "<sources>",
"video_processing": "<video_processing>"
},
"name": "import_library_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sources | Yes | ||
| language | No | Supported narration language code, e.g. es for Spanish. Omit for the default. | |
| input_prompt | No | Optional instructions for how Trainn AI should edit the video. | |
| idempotency_key | Yes | ||
| video_processing | Yes | Required user choice for every MP4 in this import. preserve_original keeps the source exact. agentic_enhance has Trainn AI rebuild it as a narrated walkthrough and uses the workspace's Trainn AI video usage. A silent source is acceptable for enhancement. |