edit_asset
Update or delete a library asset.
External MCP asset-code rule: use full replacement json.code. For Motion Graphics, inspect_asset includeCode:true returns asset.revision; pass asset.revision as expectedRevision to reject stale edits. Do not use codeFile.
update: change asset-level fields. Code update transport depends on the current agent surface. Before writing code, read its Skill: Motion Graphics=create-motion-graphics, effects/transitions=create-shaders (external hosts: shader-gen). If missing, read /skills//SKILL.md in ChatCut-Inc/agent-plugin, then go on. For other fields use json (e.g. filename, sourceLut). type is optional for update and inferred from assetId.
MG properties: {key,label,type,defaultValue}; change asset defaults with propertyDefaults:{key:value}, or one clip with edit_item propertyOverrides. Legacy root property keys normalize only with explicit type:"motion-graphic". width/height are clip/source dimensions; duration aliases durationInSeconds.
sourceLut:null removes a video/image/gif source grade; sourceLut:{assetId} applies an existing builtin or project LUT effect to ALL instances. Find project LUTs via browse_assets type:"effect" (a lut-typed editable property). Unique prefixes resolve; nonexistent LUTs fail. For one clip/range use edit_item instead.
delete: remove the asset and any items/effects/transitions that reference it. If references exist, the tool first returns the impact and requires confirmImpact:true before deleting.
Asset properties live on the asset; clip-level position and per-instance overrides live on the item — use edit_item for those.
This runtime cannot read the agent's workspace files. For code-based assets, set the complete replacement source inline in json.code.
Web analysis declarations belong in json.chatcutSpecialEffectUsed; see the json parameter and create-shaders skill.
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>",
"assetId": "<assetId>"
},
"name": "edit_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | JSON for update: {"type":"motion-graphic","code":"..."}. Web Motion Graphic edits use the shared syntax/API/renderer-contract validator. Invalid code and known incompatibilities must be fixed. Uncertain analysis is a non-blocking warning: make at most one best-effort repair, never repeatedly rewrite just to silence it. Valid code without known incompatibilities receives the renderContract stamp without a preview or caller declaration. Desktop retains its native policy. chatcutSpecialEffectUsed: Optional Web-only media-analysis declarations. Omit for ordinary MG/effect/caption work and preserve existing values on unrelated revisions. Transitions and Desktop do not support these readers. caption_v1 is private to caption-owned code. | |
| type | No | Asset type (for delete) | |
| action | Yes | update or delete | |
| assetId | Yes | Asset ID or prefix ID | |
| projectId | No | Project for this call (full ID or unambiguous prefix). Explicit-timeline calls never change the target of later calls; legacy project selection applies otherwise. | |
| timelineId | No | ||
| confirmImpact | No | For action=delete only: pass true only after the user confirms the reported timeline impact. | |
| expectedRevision | No | Revision returned as asset.revision by inspect_asset includeCode:true for a Motion Graphic. Pass with inline json.code to reject a stale source copy. Omit for asset types without revision guards. |