Update artifact
update_artifactReplace parts of an existing artifact with content you wrote, keeping its folder ID, link and sharing. If the artifact is shared by link, the change is visible to anyone with that link, including people outside the workspace; get_file_sharing shows who can open it. Only what is sent changes: each listed file is written (null deletes it), each edit replaces one exact match of its find text in an existing text file, description replaces the card text, and title renames it; every other file is kept. Prefer edits for small changes to a large file. Read the current files with list_files and read_file first. Call show_artifact afterwards so the user sees the change. Requires write permission; deleting a file also needs delete permission, which API keys don't have. Checks run before anything is written; if storage fails partway, files already saved stay, so re-read before retrying, and re-sending the same files is safe. To have Replo's agent revise it from a request in words, use generate_artifact with fileId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | No | Targeted replacements in existing text files, applied in order, so a small change doesn't resend the whole file. If any edit fails to match exactly once, nothing is saved. A path can't appear in both files and edits. | |
| files | No | Files to write, keyed by relative path; null deletes that file. Files not listed are kept. index.html is the page. Link sibling files with relative URLs; scripts may load only from the artifact, cdnjs, jsDelivr /npm/, unpkg, the Tailwind CDN and the jQuery CDN, and other outbound requests are blocked. Each *.insights.json file is an Insights report document (version "2.0", the shape get_insights_report returns) whose saved queries run live for each viewer; embed one with <replo-report src="./sales.insights.json"></replo-report>. report.insights.json is the artifact's main report, the one the Insights report tools read, and without index.html Replo renders the page around it. | |
| title | No | Renames the artifact. | |
| fileId | Yes | The .artifact folder ID, including for Insights artifacts; never an embedded report file ID. | |
| projectId | Yes | ||
| description | No | The one-line summary shown on the artifact's card. |