media_presign
Mint fresh presigned HTTPS GET URLs for 1-100 object keys from earlier media_upload calls.
Use when an uploaded file’s URL has expired or is about to; nothing is re-uploaded. Only keys you uploaded work. Keys fail independently: check failed and items[].error.
| Requirement | Value |
|---|---|
| Registration | Requires the selected object-storage backend: OBJECT_STORAGE_BACKEND=tos (default) with TOS_ACCESS_KEY, TOS_SECRET_KEY and TOS_BUCKET; or OBJECT_STORAGE_BACKEND=s3 with S3_ACCESS_KEY, S3_SECRET_KEY and S3_BUCKET. |
| Execution | Foreground only |
| Required permission | media:presign |
This site lists the full configured capability surface, not the tools enabled on your particular server. Use model discovery and job discovery to check your connection. Credentials are server configuration, never tool arguments.
Ask your connected AI client to use media_presign for the operation you want.
The client constructs the arguments and handles tool calls. Review its proposed
operation before approving anything billable. For a non-billable introduction,
start with discovery without generation.
Call this tool directly. It is not a background-job target.
Match the input fields below and the full JSON Schema. See the worked examples for this capability and Background Execution for job/result handling.
Inputs
Section titled “Inputs”The MCP arguments object wraps these fields as {"input": {...}}.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
expires_in_seconds |
integer or null | No | Presigned URL validity in seconds for every key; defaults to the server presign TTL. Use >= 3600 for URLs destined for vod_* tools, which fetch asynchronously.; Default: null |
object_keys |
array of string | Yes | object_key values from media_upload (1-100), e.g. ‘references/video/ |
Outputs
Section titled “Outputs”| Field | Type | Required | Description and constraints |
|---|---|---|---|
failed |
integer | Yes | Number of keys that failed; see items[].error. |
items |
array of MediaPresignItem | Yes | Per-key results in request order. |
succeeded |
integer | Yes | Number of keys that produced a URL. |
Nested Types
Section titled “Nested Types”Field types named above refer to these shared definitions. Optional/null fields, enum choices and bounds are retained in the complete schemas below. Schema validation is followed by runtime capability and security checks.
MediaPresignInput
| Field | Type | Required | Description and constraints |
|---|---|---|---|
expires_in_seconds |
integer or null | No | Presigned URL validity in seconds for every key; defaults to the server presign TTL. Use >= 3600 for URLs destined for vod_* tools, which fetch asynchronously.; Default: null |
object_keys |
array of string | Yes | object_key values from media_upload (1-100), e.g. ‘references/video/ |
Complete JSON Schemas
Section titled “Complete JSON Schemas”Input schema, including the MCP wrapper
{ "$defs": { "MediaPresignInput": { "description": "Input model for ``media_presign``.", "properties": { "expires_in_seconds": { "anyOf": [ { "maximum": 604800, "minimum": 60, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Presigned URL validity in seconds for every key; defaults to the server presign TTL. Use >= 3600 for URLs destined for vod_* tools, which fetch asynchronously." }, "object_keys": { "description": "object_key values from media_upload (1-100), e.g. 'references/video/<uuid>'.", "items": { "type": "string" }, "maxItems": 100, "minItems": 1, "type": "array" } }, "required": [ "object_keys" ], "type": "object" } }, "additionalProperties": false, "properties": { "input": { "$ref": "#/$defs/MediaPresignInput" } }, "required": [ "input" ], "type": "object"}Output schema, including nested definitions
{ "$defs": { "MediaPresignItem": { "description": "Per-key presign result.", "properties": { "code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error code if failed: INVALID_KEY, NOT_OWNED, INTERNAL, or a provider code.", "title": "Code" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Error message if failed.", "title": "Error" }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ISO-8601 expiry of url; null if failed.", "title": "Expires At" }, "object_key": { "description": "The requested object key.", "title": "Object Key", "type": "string" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Provider request ID, if available.", "title": "Request Id" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Fresh presigned HTTPS GET URL; null if failed.", "title": "Url" } }, "required": [ "object_key" ], "title": "MediaPresignItem", "type": "object" } }, "description": "Output model for ``media_presign``.", "properties": { "failed": { "description": "Number of keys that failed; see items[].error.", "title": "Failed", "type": "integer" }, "items": { "description": "Per-key results in request order.", "items": { "$ref": "#/$defs/MediaPresignItem" }, "title": "Items", "type": "array" }, "succeeded": { "description": "Number of keys that produced a URL.", "title": "Succeeded", "type": "integer" } }, "required": [ "items", "succeeded", "failed" ], "title": "MediaPresignOutput", "type": "object"}Troubleshooting
Section titled “Troubleshooting”- Missing tool: check provider credentials and feature flags, then restart the connection.
- Invalid arguments: keep the correct wrapper and follow current model limits from discovery. A valid schema alone does not prove the chosen model supports the combination.
- A job completes with an error: inspect the original tool result, not only the outer job status. Never automatically resubmit potentially billable work.
- Local output writes from jobs require server-configured
OUTPUT_ROOTS; HTTP cannot write to a client’s local disk.
See configuration, background execution, and artifact delivery.