Media — create and change
media_writemedia_write — Scripe media (the media library: search images, add the user's own, AI-generate images and carousels): create and change operations. Changes data — confirm the user's intent before chaining. An operation taking confirmationToken is two-phase: its first call only returns a proposal. Call media_write({ action: "", arguments: { …its arguments } }); describe_actions has an operation's full docs when its signature is not enough.
create_media_asset(projectId?: string, content_base64?: string, sha256?: string, uploadId?: string, fileName?: string, mimeType?: string, alt?: string, title?: string) — add the user's OWN image to a Scripe project's media library — send the bytes inline as
content_base64(small files only, ~3 MB decoded max — larger requests die at the platform edge as a bare 413), or pass anuploadIdfrom…generate_image(idempotencyKey?: string, projectId: string, kind: PHOTO|PHOTO_EDIT|IMAGE_EDIT, promptAsset?: string, subject?: string, steer?: string, referenceMode?: style|replicate, referenceMediaIds?: string[], subjectMediaIds?: string[], baseMediaId?: string, wait_for_completion?: bool) — AI-generate a raster image into a Scripe project's media library.
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": {
"action": "<action>"
},
"name": "media_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The operation. | |
| arguments | No | Its arguments, as its signature names them. |