upload_asset
ManagementUpload Asset
Upload a local file to Scenario and return an asset_id for use in run_model, analyze, display_asset, or other asset-backed tools. Two paths: (1) multipart presigned-URL upload (preferred), or (2) small inline base64 upload. IMPORTANT: Always prefer the multipart path when the host has shell access (e.g. Claude Desktop, Claude Code, Cursor). Passing base64 data in the tool call consumes context window and will fail or saturate the conversation for files above ~100KB. Only use inline base64 for very small files (<100KB) or when no shell is available. Args: - file_name, content_type, kind: required file metadata - file_size: required for multipart uploads — omit 'data' and pass file_size in bytes instead - data: base64 file contents — ONLY for tiny files (<100KB) when no shell is available - team_id, project_id: required for OAuth callers Returns: for multipart uploads, returns presigned upload URLs and upload_id — use curl to PUT each file part, then call complete_upload. For inline uploads, returns an immediate asset_id. If the host cannot execute shell commands to upload file parts, ask the user to upload at https://app.scenario.com and provide the asset_id. Examples: - "Upload this image" (with shell) -> get file_size with wc -c, omit data, pass file_size, then curl PUT each part, then complete_upload - "Upload a large video" -> same multipart flow: file_size, presigned URLs, curl, complete_upload - "Upload a tiny icon" (no shell, <100KB) -> pass data="<base64>" for single-step upload Don't use when: You already have a Scenario asset_id. Prefer reusing the existing asset_id in downstream tools instead.
Current limitation: MCP file-input UX is still evolving across clients. Until broader support lands, this tool uses base64 for small files and presigned URL multipart uploads for large files. UX will depend on the client used. And you may be required to upload the file at https://app.scenario.com and provide theasset_id to the MCP.
See SEP-2356 (PR #2356) for the protocol proposal details.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| file_name | string | ✓ | Filename with extension, e.g. "photo.png" |
| content_type | string | ✓ | MIME type, e.g. "image/png" |
| kind | enum(image | audio | video | 3d) | ✓ | Asset kind: image, audio, video, or 3d |
| file_size | number | — | File size in bytes. Preferred path: pass file_size and omit data to get presigned upload URLs. Always use this for files above 100KB. |
| data | string | — | Base64-encoded file data for inline upload. Max ~100KB. WARNING: base64 data consumes context window — only use for very small files when no shell is available. Prefer the presigned URL path (pass file_size, omit data) instead. |
| team_id | string | — | Team ID. Required if user belongs to multiple teams. |
| project_id | string | — | Project ID to scope the operation to. |
| response_format | enum(json | markdown) | json | Output format: 'json' for structured data, 'markdown' for human-readable text. |