Skip to main content
Glama

Open in-chat file uploader

create_library_upload_session
Idempotent

Creates an upload session for local MP4 or PDF files in Trainn Library. Call this in the same turn the user asks to upload, add, or send a local file without a named lesson or cover, except when collecting video editing instructions below. Open the session before requesting or searching for files, even when no file is attached and any uploads folder is empty; file selection is not a prerequisite. The tool needs only an idempotency_key and optional input_prompt and language; file selection happens afterward in the Trainn uploader. Chat attachments cannot be transferred into Trainn. Do not ask users to attach a file in chat or ask what it is for. For video uploads, 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 before calling this tool unless the user already supplied their choice and instructions. A request describing how the video should turn out chooses Create with Trainn AI; pass it as input_prompt. For Upload original, omit input_prompt. If they choose Trainn AI without instructions, ask how the videos should turn out. One prompt applies to every video in the batch; accept freeform instructions even if some edits are unsupported. Do not ask this for PDFs, lesson uploads or covers. Users can select multiple files or a folder; each file becomes an unpublished Library draft. Supported hosts display an in-chat uploader; other hosts receive a standalone upload link. When the in-chat uploader is ready, do not paste a link; when one upload link is returned, show only that link. get_library_upload_status reports uploaded items after file submission.

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>"
    },
    "name": "create_library_upload_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
languageNoSupported narration language code, e.g. es for Spanish. Omit for the default.
input_promptNoInstructions for Create with Trainn AI, applied to every selected video. Supplying instructions selects the agentic upload flow; omit for Upload original.
idempotency_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare non-read-only, open-world, idempotent, non-destructive, and the description adds substantial behavior beyond them: each selected file becomes an unpublished Library draft, hosts either show an in-chat uploader or receive a standalone upload link, and the agent must paste the link only when exactly one is returned. It also discloses that chat attachments cannot be transferred into Trainn, preventing a common dead-end attempt.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the key 'call in the same turn' rule are front-loaded, but the body is bloated with overlapping instructions ('Chat attachments cannot be transferred' near-duplicates 'Do not ask users to attach a file in chat') and a confusing forward reference ('except when collecting video editing instructions below') that appears before the instructions it points to. The quoted user-facing script is useful but makes the block long and hard to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex branching tool with no output schema, it covers the decision points an agent needs: timing, waiting, video-vs-PDF scoping, prompt semantics, and what the return looks like (in-chat uploader vs single link) plus the follow-up status tool. The one gap is the unresolved PDF contradiction, which leaves a real scoping question unanswered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds real meaning beyond the 67%-covered schema: supplying input_prompt selects the agentic 'Create with Trainn AI' flow while omitting it means 'Upload original,' one prompt applies to every video in the batch, and freeform instructions are accepted even if some edits are unsupported. idempotency_key and language are left to their schema descriptions, which is acceptable given existing coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb and resource: 'Creates an upload session for local MP4 or PDF files in Trainn Library,' which separates it from create_lesson_upload_session and create_course_cover_upload_session by naming lesson uploads and covers as out of scope. The clarity is undercut by the later line 'Do not ask this for PDFs, lesson uploads or covers,' which appears to contradict the stated PDF support in the first sentence and leaves the agent unsure whether PDFs route here.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Extremely explicit about timing and preconditions: call 'in the same turn the user asks to upload,' open the session 'before requesting or searching for files, even when no file is attached,' and file selection is 'not a prerequisite.' It also states when to wait (video editing question unanswered), how to branch (described outcome selects Create with Trainn AI; Upload original omits input_prompt), what not to ask (no chat attachments, no 'what is it for'), and points to get_library_upload_status afterward.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources