muninn_artifact_add
Store a text-based artifact you generated — markdown, plain text, csv, json, code, a mermaid diagram, svg, or an HTML page — so it outlives this session and can be retrieved by any model or from the web app. Use this for OUTPUT you produced (a document, a table, a diagram, a page), not for notes or facts about the user; those are muninn_memory_add. The source is stored in full, never a link. Artifacts are deliberately excluded from semantic search, so give a clear title and tags — that is how they are found again. Returns {success, memoryId, format, url, length, connect}. For html/svg: runs in a sandboxed iframe on a separate origin. LINKS: write a plain absolute — a Muninn page opens in the same tab, anything else in a new tab; no target attribute needed. READING ANOTHER ARTIFACT: fetch its absolute /raw url. READING AN OUTSIDE API: the sandbox blocks fetch() to any non-Muninn host unless the artifact declares it in connect (bare hostnames, e.g. ["api.open-meteo.com"]) — readers are shown the list, and the host must answer Access-Control-Allow-Origin: *. Full rules: muninn_help, section "Authoring artifacts". TO EDIT ONE LATER there is no muninn_artifact_update — an artifact's artifactId IS its memoryId, so redraft it with muninn_memory_update (whole body), muninn_memory_anchor_replace (one span) or muninn_memory_append. Editing replaces in place, and a published artifact's public link refreshes automatically. The supported formats and the mime value for each are listed in the mime parameter below and in muninn_help. HANDLES: an account can hold several handles (e.g. a personal one and a company one), each a separate public address; an artifact lives under exactly one, and its named page only ever answers there. Pass handle only when the user says which one; omit it and the artifact goes under their default (oldest) handle. Move it later with muninn_artifact_move.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>",
"format": "<format>"
},
"name": "muninn_artifact_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | The artifact's media type, from the closed list. Sets the file extension on download and nothing else — a mermaid source is text/vnd.mermaid so it exports as .mmd, not .txt. Defaults to text/html. | |
| tags | No | Tags, same as muninn_memory_add. The main way an artifact is found later. | |
| title | No | Display name for the artifact, e.g. 'BUI org chart'. Strongly recommended: artifacts are not semantically searchable, so the title carries the findability. | |
| format | Yes | What kind of source this is — selects the renderer. md, txt, csv, json, code, mermaid, svg, or html. | |
| handle | No | Which of the user's handles this artifact lives under, e.g. 'chai' — only if the user named one. Must be a handle this account holds; any other is refused and nothing is saved. Omit for the default (oldest) handle. Does NOT publish anything. | |
| source | Yes | The artifact's full source text, stored verbatim. | |
| connect | No | html/svg only: outside hosts this artifact fetches data from at runtime, as bare lowercase hostnames — ["api.open-meteo.com"]. No scheme, path, port, wildcard or IP; at most 8; Muninn's own hosts are already reachable and are refused here. Declare exactly what the source calls: the sandbox blocks fetch() to any host not listed, and every page that shows the artifact names this list to the reader. Not needed for <script src>, images, fonts or styles from a CDN. Change it later with muninn_artifact_connect. | |
| project | No | Project slug to scope this artifact. Omit for user-global. | |
| sourceModel | No | Which model produced this, for provenance, e.g. 'claude-opus-5'. |