artifact_write
Store or update a long document (markdown, JSON or text) behind a pointer memory. For agents.md, skills.md, assertions.md, a project plan: anything past one memory's 768-token cap.
CREATE: name ("assertions.md"), summary (the pointer memory: what the document is and why; search finds the pointer, never the body), body, topics, optional collection. UPDATE: artifact_id + base_rev_id (the rev_id you last read) + either body (whole document) or section + content (replace one block: markdown heading path ["Plan","Risks"], or JSON pointer "/rules/3"; content starting with a heading line replaces the heading too, so what artifact_read returned can be edited and written back). 409 STALE_BASE: someone saved since you read; re-read, re-apply. 409 CONFLICT: divergent heads; write with merged_rev_ids=[the other heads].
Size: Plus 512 KB; Pro and above no product limit; Free not available. Retention: every save is a revision. Kept: everything from the last 24h, then the newest per day to 30 days, then the newest per week, within 30 days (Plus) or 365 days (Pro+), at most 500. The head and pinned revisions (artifact_pin) are never removed; a shared artifact keeps the longest window any of its writers had. Thinning runs only when this artifact is saved.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "artifact_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Whole document text. | |
| name | No | File name; extension sets the format (.md markdown, .json json, else text). | |
| topics | No | CREATE: pointer search words. | |
| content | No | Replacement for section. | |
| section | No | Markdown heading path (array of heading texts) or JSON pointer string. | |
| summary | No | CREATE: pointer memory text. Front-loaded: what the document is + why. | |
| collection | No | CREATE: shared collection. Omit=default. "me"=personal. | |
| occurrence | No | 0-based pick when the section path matches more than one heading. | |
| artifact_id | No | Pointer memory id. Omit to create. | |
| base_rev_id | No | UPDATE: the head rev_id you read. | |
| macro_topics | No | CREATE: project/domain. | |
| merged_rev_ids | No | Other heads this write resolves. |