upload_artifact
Store base64-encoded files in a workspace content-addressed artifact store, register metadata, and return a SHA-256 record; identical bytes deduplicate and reuse the same hash.
Instructions
Store a file in the workspace's content-addressed artifact store from base64 bytes and register its metadata, returning the artifact record with its sha256, size_bytes, kind and mime_type. Identical bytes share one sha256, and uploading them again overwrites the workspace's recorded kind and mime_type and emits another artifact_upserted event. The whole request must fit the server's request body limit (2 MiB by default); for larger files use begin_artifact_multipart, which needs an S3 backend. The upload is refused, and nothing stored, when the workspace is over its stored-bytes allowance or when a screenshot, recording or attachment would exceed its media quota. Use link_thread_artifact to attach the result to a thread as evidence. Requires artifact:upload.
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": {
"kind": "<kind>",
"content_base64": "<content_base64>"
},
"name": "upload_artifact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | What the artifact is: screenshot, recording, transcript, code_dump or attachment. Screenshot, recording and attachment are media and count toward the workspace's media quota and can expire; transcript and code_dump are evidence and are never counted or expired. | |
| mime_type | No | Optional media type of the bytes, for example image/png, recorded on the artifact's metadata. | |
| content_base64 | Yes | The file's bytes, standard base64 encoded. It must decode and must not be empty. |