Skip to main content
Documents, HTML pages and tables are all artifacts. One artifact has one id, and that id appears in three places. The id is an opaque string. Treat it as a token you copy, never something you parse or construct.

Getting an id

  • From the app: the address bar of an open artifact, or Copy for agent in the artifact header, which includes both the URL and the bare id.
  • From MCP: list_documents returns document_id for every row, and every create tool returns the id of what it created.
  • From knowledge search: search_knowledge and ask_knowledge return a document_id too, but that is the knowledge base’s identifier for an ingested source. It is not guaranteed to be an artifact id and cannot be passed to the document tools unless the source is itself a Sidecars document.

Ids for other things

Kinds of artifact

read_document and list_documents report a type: Using the wrong write tool for a kind is refused with a message that names the right one.

Versions

Every read of a document or page returns a version number, and every successful write returns new_version. Versions move on every saved change, including human keystrokes. How each write tool treats expected_version is described on its reference page; the short version:
  • write_page and edit_document with replace_all require it and refuse on mismatch.
  • edit_document with replace_section uses the quoted excerpt as the freshness check and only reports drift.
  • edit_document with append treats it as informational.

Copy for agent

Every open document in the app has a Copy split button in its header, left of Share. It reads the live editor, so what you copy is exactly what is on screen, saved or not. Copying never changes sharing or access. The URL in the handoff is the same one in the address bar and is gated by the same roles.

The handoff format

Copy for agent produces text shaped like this (fictional example):
When the editor holds edits the server has not confirmed yet, an extra block appears before the divider:
Last saved is included in every handoff.

How an agent should treat it

1

Prefer the live version when connected

If the Sidecars MCP server is connected, call read_document with the Artifact ID to get the latest saved content and its version.
2

Merge unsaved edits, do not overwrite

If the handoff carries the UNSAVED CHANGES block, the snapshot holds edits the server never saw, and the server copy may have moved on since the copy was taken (Last saved tells you when). Neither side is simply newer. Read the live version, carry the snapshot’s edits into it, and write the merged result with expected_version from that read; on version_conflict, read again and merge again.
3

Write back through MCP, or say you did not

Save changes with edit_document. Without MCP access, work from the snapshot and tell the person the original was not updated.