commit_artifact_upload
ChatGPTFinish an upload session from request_artifact_upload (Editor/Owner) once every PUT has landed. It checks every file arrived at its declared size and publishes in the background, answering status "committing". Poll by calling it again (not get_artifact), which also restarts a run that stalled, for the outcome: "committed" with current_version_id, or "failed" with reason. conflict means someone saved first: read the artifact again and start a new session. too_large and quota_exceeded are limits; storage_full means the artifact holds all the storage it may, older versions' files included, until they expire; invalid_file means a file is not the bytes or the type its path says; invalid_content means the page is not UTF-8 text; blocked means a file cannot be published. A file that has not arrived is named in the error: upload it and commit again.
create_artifact
ChatGPTCreate an HTML or Markdown artifact in a project (Editor/Owner) — the default, simplest way to create one: one call, content included. Use this unless the document is large (say, above a few hundred KB) AND you can also issue a raw outbound HTTP request yourself outside of tool calls — only then is request_artifact_upload worth the extra step. On success, response includes created_by + created_by_name and console_url — return console_url to the user so they can open the artifact in the ShareCube web app to edit further and manage visibility/permissions. share_url is the public link path (access still depends on visibility set in the console).
create_folder
ChatGPTCreate a folder in a project, optionally inside another folder (Editor/Owner). Folders nest up to 4 levels. A folder only organizes: artifacts keep their own sharing. Returns folderId, console_url and share_url; then call move_artifact to put artifacts in it.
create_project
ChatGPTCreate a new project in the caller's org. The caller becomes Owner. Use the returned projectId as project_id for create_artifact. There is no name-uniqueness constraint — check list_projects first if you want to avoid a duplicate.
delete_artifact
ChatGPTPermanently delete an artifact (Editor/Owner).
delete_artifact_file
ChatGPTRemove one file from an artifact (Editor/Owner). A deleted file stays in earlier versions, which can be restored from the ShareCube console.
delete_folder
ChatGPTDelete a folder (Editor/Owner). children is required: "delete" permanently deletes every artifact inside, sub-folders included; "move_up" first moves its contents to the parent folder or the project root. Confirm with the user before using "delete".
edit_artifact
ChatGPTReplace one exact piece of text inside an artifact (Editor/Owner), without sending the whole document. Prefer this over update_artifact for any targeted change to an existing document, and especially for a large one: the body is read, edited and written server-side, so a small edit costs two short strings instead of a full copy in each direction. old_str must match the current content exactly, whitespace and line breaks included, and must appear exactly once — if it appears more than once the edit is refused rather than applied to a guess, so extend old_str with surrounding text until it is unique, or pass replace_all=true to change every occurrence. new_str may be empty to delete the matched text. Creates a new content version, so pass base_version_id from get_artifact (or from your own previous update) to be told about a concurrent save instead of overwriting it. To rewrite a document wholesale, or to change only the title, use update_artifact.
edit_artifact_file
ChatGPTReplace one exact piece of text inside one text file of an artifact (Editor/Owner), like edit_artifact does for the page. old_str must match exactly and appear once, unless replace_all is true. Read the file first with get_artifact_file. For files over 4 MB or binary files, use write_artifact_file.
get_artifact
ChatGPTLoad artifact metadata and full content. Response includes created_by + created_by_name, console_url (web app editor, comments, sharing/permissions), and share_url (public share page). Always give the user console_url when they need to continue editing or manage access. The response also includes current_version_id — keep it and pass it as base_version_id if you later call update_artifact or request_artifact_upload (update mode). After an out-of-band PUT from request_artifact_upload, poll this tool: you succeeded only if current_version_id is a new id AND the content is your revision. content_upload_error=conflict means a concurrent save won — re-read, rebase, retry. If current_version_id is still the base after about a minute, the PUT never finalized — re-read and retry. Do not treat "the version id changed" alone as proof your PUT won.
get_artifact_file
ChatGPTRead one file of an HTML artifact. Text files up to 1 MB come back as content. Every file also comes with a url that serves it for at least five hours, for images, video and larger files. Pass version_id to read a file as it was in an older version. get_artifact lists the files.
get_artifact_state
ChatGPTRead the data an HTML artifact's page has saved (its state: a JSON document per slash-separated key). Pass key for one document, or prefix (and cursor) to list. You see what the artifact's rules let you see; other people's private data under users/<id>/ never shows. level and me say who you are to the rules: me is your own id, the {self} in users/{self}.
get_artifact_state_rules
ChatGPTWho may read and change each part of an HTML artifact's persistent state (Editors only: the rules name what is hidden from others): the artifact's own rules, any change waiting for an Editor, and the defaults underneath (people with access read, Commenters and up change, users/{self} is each person's own).
get_frame
ChatGPTLook at one frame of a video, as an image. Pass t_ms, a time in milliseconds (it is rounded to 100 ms and kept inside the video), or thread_id of a comment on a video to see the moment and area it points at: the area is outlined on the frame. A page with several videos needs path. Pass version_id for an older version, which only project members can read. Also returns a url that serves the frame for at least five hours. A video that is still being prepared has no frames yet; try again in a minute.
get_template
ChatGPTGet one template by id from list_templates: its source with {{placeholders}}, and fill_prompt, how to fill it. Replace every placeholder with real content, follow fill_prompt, then save the result with create_artifact using the template's type. Never save the template with its placeholders.
get_upload_link
ChatGPTWhen you can't send a file's bytes yourself (no outbound network, an upload host your sandbox blocks, or a file too big to send inline), get a link the user opens in their browser to upload images, video or audio straight into the project (Editor/Owner). Prefer this over retrying a failed upload.
import_chat_files
ChatGPTUse this whenever the user attached photos, video or audio in this chat and wants them in ShareCube: it saves them into a new ShareCube media artifact (Editor/Owner). Pass the attachments as files; ShareCube downloads them itself, so you send no bytes. Do not read, base64 or re-upload an attachment yourself, and do not use request_artifact_upload or create_artifact for it. Several images make a carousel; one video or one audio file makes its own artifact. At most 100 MB per call. Then call commit_artifact_upload with session_id until it says committed. If it refuses, give the user the upload link in its answer.
list_artifacts
ChatGPTList artifacts. Pass project_id to scope to one project; omit it to list all accessible artifacts in the org. Each item includes created_by + created_by_name, and console_url / share_url when configured.
list_folders
ChatGPTList every folder in a project, with parent_folder_id and depth so you can rebuild the tree. Use list_artifacts with folder_id to see what one folder holds.
list_projects
ChatGPTList projects the API key owner can access. Use projectId from the result as project_id when creating or listing artifacts. Requires membership; Editor/Owner needed to create artifacts.
list_templates
ChatGPTList the designed templates the caller's org can start an artifact from: ShareCube's built-in ones and any the org made itself (origin "org"). Prefer an org template when one fits. Read one with get_template before filling it.
move_artifact
ChatGPTMove an artifact into a folder of its own project, or back to the project root with folder_id "" (Editor/Owner). Its sharing settings do not change. It goes to the end of the folder unless after_id names the item it should follow.
move_artifact_file
ChatGPTRename or move one file of an artifact (Editor/Owner) without sending it again. The destination must be free and keep the same kind of extension. Update the page if it references the old path.
move_folder
ChatGPTMove a folder, with everything in it, into another folder of its project, or to the project root with parent_folder_id "" (Editor/Owner). It goes to the end of the destination. Folders still nest at most 4 levels, so a move that would go deeper is refused, as is a move into the folder itself or one of its own folders. Sharing settings do not change.
refresh_upload_urls
ChatGPTGet new upload URLs for an upload session from request_artifact_upload (Editor/Owner) whose URLs expired before every PUT landed, as can happen with a large video. Only what has not arrived yet is returned: whole files that are missing, and the missing parts of a multipart file. Send those, then call commit_artifact_upload. Each refresh renews the session for another hour, up to 20 hours after it was created, after which you must start a new session. A session that is already being saved cannot be refreshed. The page is never re-signed.
reorder_folder
ChatGPTMove one item (artifact or sub-folder) within its folder: right after after_id, or to the front when after_id is omitted (Editor/Owner). Only that item is rewritten.
request_artifact_upload
ChatGPTOut-of-band HTTP PUT for large HTML/Markdown bodies — skip this unless you can issue a raw outbound HTTP PUT yourself, separately from MCP tool calls. This tool does not send the bytes; it only mints {artifactId, upload_url, console_url}. Then PUT the raw file to upload_url (no Authorization header, no Content-Type). Two modes: CREATE — project_id + display_name + type (do not pass id). The new artifact is invisible until the PUT lands, and the pending upload expires after 1 hour. UPDATE — id + base_version_id from get_artifact (do not pass project_id or type; optional display_name). Use this to revise an existing artifact; do NOT call this in create mode a second time — that mints a new id and strands comments/share URL. After the PUT, poll get_artifact: success is a new current_version_id whose content is your revision (usually a few seconds). If content_upload_error is conflict, or current_version_id moved to someone else's save, rebase and retry. If it is still the base after about a minute, retry. For small edits or title-only changes, use update_artifact instead.
search_artifact
ChatGPTFull-text search across artifacts the caller can access. Returns matching artifact metadata (including console_url when available).
search_graph
ChatGPTSearch the org knowledge graph for concepts and relationships extracted from artifacts the caller can access. Requires the graph_search entitlement.
set_artifact_state_rules
ChatGPTReplace an HTML artifact's own state rules (Editors only). Each rule is {path, read?, write?, create?, update?, delete?, max?}; levels are anyone, viewer, commenter, editor, creator, self (only on a path ending in {self}) and none. The deepest rule covering a key decides each operation; unset ones fall through. Nobody may update or delete what they can't read, so a write-only path sets read, create, update and delete. Rules that let people without an account (anyone) in are saved as pending and apply only once an Editor confirms them in the console.
show_upload_panel
ChatGPTShow the user an upload panel in the chat, to pick photos, video or audio on their device and upload them into a project (Editor/Owner). Use it when the user wants to upload files you can't send yourself. If no panel shows, give the user upload_link from the answer.
update_artifact
ChatGPTUpdate artifact content and/or display_name (Editor/Owner). Default for small inline edits and title-only changes. For a large document body (say, above a few hundred KB) that you can PUT over raw HTTP, use request_artifact_upload with id + base_version_id instead — do not create a second artifact. Creates a new content version when content is provided. When you update content, ALWAYS pass base_version_id set to the current_version_id you got from get_artifact (or from your own previous update_artifact response). The update is then rejected with a conflict error if someone else saved in between, instead of silently overwriting their work — people edit these documents in the web app while agents write to them. On a conflict error, re-read with get_artifact, re-apply your edit to the latest content, and retry.
write_artifact_file
ChatGPTSave one file of an HTML artifact (Editor/Owner): add it, or replace it if the path is taken. Use content for text (HTML, CSS, JS, JSON, CSV, SVG, Markdown), url for a file on the web (the server fetches it, up to 10 MB), or content_base64 for binary bytes your code produced. Never type out base64 for images or other binary: give a url, or upload from code with request_artifact_upload. The page references it by relative path, so img/logo.png loads from <img src="img/logo.png">. Makes a new version with every other file kept; saving the same bytes again changes nothing. At most 4 MB per call, and base64 counts as sent, so a binary file can be about 3 MB.
write_artifact_state
ChatGPTChange an HTML artifact's persistent state, as the user and within its rules. Up to 25 changes, applied in order; a failure stops there. Ops: set (replace), update (shallow-merge an object), increment (add a number, default 1), append (add items to a list), delete, add (a new document under collection with a generated id). There is no history: an overwrite or delete is permanent, so only change data the user asked you to.
create_artifact
Claudecreate_project
Claudedelete_artifact
Claudeedit_artifact
Claudeget_artifact
Claudelist_artifacts
Claudelist_projects
Clauderequest_artifact_upload
Claudesearch_artifact
Claudesearch_graph
Claudeupdate_artifact
Claude