MCP tool reference
Find the arguments, results, errors, and limits for each artifact.cafe MCP tool.
Use the IDs that the tools return. An artifact ID is not the same as a slug in a review URL. See MCP permissions and approvals for the access each tool needs.
If a tool returns an error, use its message and docsUrl to find the next step. See Common errors and limits for errors that apply to more than one tool.
Find and read artifacts
get_guide
Get a guide or the HTML template. Pass name, such as design, authoring, or template. If you omit name, you get design.
You get name, content, and a note that lists the guide names. If the name is unknown, invalid_request lists the available names.
list_workspaces
Pass no arguments. You get workspaces with their IDs, handles, and folders. Use the handle to search. Use the workspace and folder IDs to publish.
If a workspace is missing, check the workspace selection for your connection.
search_artifacts
Pass workspace as a workspace handle. Pass q to find sections by text, or omit it to list recently updated artifacts. Set limit from 1 to 25. The default is 10.
With q, you get results with section IDs, snippets, URLs, and version numbers. Without q, you get artifacts with artifact IDs, titles, URLs, and version numbers.
If invalid_request appears, check the handle and query. A query must contain 1 to 1,000 characters. If not_found appears, use a workspace from list_workspaces.
read_artifact
| To read | Pass | You get |
|---|---|---|
| The current outline | artifactId and optional mode: "outline" | version, hints, and sections with id, path, and title for each section |
| A section | Only sectionId. Do not pass artifactId or path. | Markdown in text, the version, and links to adjacent sections |
| A source file in the current version | artifactId and the section's path from the outline, such as index.html | Exact text, path, and version |
If invalid_request appears, use only the arguments for your mode. If a section is not ready, not_found can name the last version you can read. An unreadable file returns edit_binary_file if it is not UTF-8 text, or payload_too_large if it exceeds 2 MB.
get_artifact
Pass artifactId. You get the title, slug, versions and notes, visibility, reviewMode, passwordSet, and expiresAt. If there is no deadline, expiresAt is null.
If you manage the artifact, you get grants with grant IDs, status, and masked email addresses. Otherwise, grants is null. If you get not_found, check the artifact ID and your access.
Publish
publish_artifact
To create an artifact, pass files. Each file needs a relative path and UTF-8 content. You can also pass title, notes, workspaceId, folderId, and expiresInSeconds.
Use up to 200 characters for title and 4,000 for notes. Use a whole number from 1 to 2,147,483,647 for expiresInSeconds.
If you omit workspaceId for a new artifact, the tool uses Personal.
{
"title": "Sample report",
"files": [
{
"path": "index.html",
"content": "<!doctype html><html lang=\"en\"><head><title>Sample report</title></head><body><h1>Sample report</h1><p>The review is open.</p></body></html>"
}
]
}For a new version, pass artifactId and the current baseVersion. Pass files to add or replace whole files, or pass replacements to edit text. Files you do not name stay in the version. Omit workspaceId, folderId, and expiresInSeconds when you publish a new version.
Each replacement needs path, old_string, and new_string. Read the source first so old_string matches the file. Set replace_all: true to change all matches. A failed replacement stops the publish.
You get artifactId, the review url, version, and each file's path, bytes, and sha256. If the artifact has a deadline, you also get expiresAt.
Some apps cannot send a large page in one call. If a publish returns invalid_request because the HTML does not end with </html>, publish a short first version. Then add one file or one set of replacements in each call. Each call makes a new version. For a document, you can publish one Markdown file, and artifact.cafe makes the page.
Read check after you publish. A completed HTML check includes errors, warnings, and screenshots at 1280 px and 390 px. If the check does not finish, the publish still succeeds. Look at check.reason when check.ran is false.
| Error | What to do |
|---|---|
invalid_request | Pass up to 1,000 files with distinct paths, or up to 100 replacements. End each uploaded HTML file with </html>. Leave out binary files and blocked paths. |
payload_too_large | Keep text content to 2 MB per call. For replacements, this includes the old and new strings. Each edited file must also fit within 2 MB. |
version_conflict | Read currentVersion and obtain the new source. Apply your changes to that version before you retry. |
edit_no_match, edit_not_unique, or edit_path_not_found | Read the source and correct the path or match. Set replace_all only if you want to edit every match. |
forbidden | Check that you manage the artifact or can publish to the destination. You cannot publish into a public folder or widen access to an existing data collection through MCP. |
If the response gets lost, retry with the same arguments within 10 minutes of the first call. If the first publish succeeded, you get the same version. If the publish is still in progress, wait for retryAfter before you retry.
Work with comments
list_comments
Pass artifactId to list open and resolved threads across its versions. Omit it to list open threads on artifacts you manage. Set offset to 0 for the first page, or omit it.
You get up to 20 threads with version numbers and nextOffset. If nextOffset is not null, use it for the next call. If not_found appears, check that you can open the artifact.
add_comment
action | Pass |
|---|---|
start | artifactId and body. Optionally pass version and anchor. |
reply | threadId and body. |
resolve or reopen | threadId. |
body accepts 1 to 10,000 characters. If you omit version, the tool starts the thread on the current version. If you omit anchor, you get a page comment without a pin. To name a page, use {"type":"page","page":"index.html"}.
You get the updated thread with its version number. If invalid_request appears, check the arguments for your action and the version number. If you get review_closed, check the review mode.
Change access or a deadline
For share_artifact, invite_people, and set_expiration, check applied for changes the tool made. If applied is an empty object, the tool changed nothing. If needsApproval is true, open approvalUrl or each link in approvalUrls. See Approve a change.
share_artifact
Pass artifactId and at least one of these arguments:
visibility:private,workspace, orunlisted, from narrowest to widest.reviewMode:off,readonly, oropen, from most to least restrictive.protection:setorremove. Do not pass a password.
You get the changes to visibility or review mode that took effect in applied. You get one approval link for each proposed change. If the tool says the artifact changed, get the current settings before you try again. If you pass public, the tool returns 403 forbidden.
invite_people
Pass artifactId and emails with 1 to 20 valid email addresses. You get one approvalUrl for the batch. You send the invitations when you approve the change.
If the tool rejects the arguments, check each address and the number of addresses. If some invitations fail on the approval page, check the addresses the page lists before you try again.
unshare_artifact
Pass artifactId and the grantId from get_artifact. Use the grant ID for a pending invitation too. You get revoked: true when the tool revokes the grant or invitation. You do not need to approve this change.
If you get not_found, get the current list of grants and check the ID.
set_expiration
Pass artifactId and expiresAt. Use an ISO 8601 time with an offset for a later deadline, or none to remove the deadline. You get approvalUrl and an empty applied object.
If you get forbidden, check that the artifact has a deadline and that the proposed time is later. To set a first deadline or shorten one, use the web app or the CLI.
Work with data records
read_data
Pass artifactId and collection on an artifact you manage. Set limit from 1 to 25. The default is 25.
You get records without their creator IDs. If nextCursor is not null, pass it as cursor to get the next page. If the collection is missing, check its name in the current artifact version.
write_data
Pass artifactId, collection, and one record object on an artifact you manage. You get the added record with its ID and timestamps, but no creator ID.
If invalid_request appears, check the record against the collection's fields. For body size and storage errors, see the Artifact Data limits.
Report a problem
submit_feedback
Pass message with up to 4,000 characters about a missing function, error, or incorrect result. Omit artifact content, comment text, and credentials from the report.
You get sent: true when the tool emails the team. If you get service_unavailable, the tool could not send the report. Try again later.
Common errors and limits
| Error | What to do |
|---|---|
401 unauthorized | Reconnect with OAuth or a valid account API key. |
403 forbidden | Check your MCP permissions. If you are writing, check that you manage the artifact. |
403 workspace_not_selected | Use a selected workspace. To add another, disconnect the app in Settings > Security > MCP. Then connect it again. If a publish cannot use Personal, pass a workspaceId from list_workspaces. |
404 not_found | Check the ID and your access. The tool may return this error for an artifact you cannot open. |
429 rate_limited | Wait for retryAfter seconds before you retry. Your client may show this as a tool error without the HTTP status. |
service_unavailable or internal_error | Try again later. For a write with no clear result, check the current state first. |
| Tool | Limit |
|---|---|
search_artifacts with q | 120 searches per minute per account, shared with API key searches |
publish_artifact | 60 publishes per hour per account, shared with other account publishes |
add_comment | 600 calls per hour per account |
write_data | 600 calls per hour per account, plus Artifact Data limits |
submit_feedback | 30 calls per day per account |
Connections and keys for the same account share these limits. See the error reference for other error codes.