Create library artifact
create_library_artifactYou need to discover, read, validate, create, or attach Prism visual artifacts.
When to use it
You need to discover, read, validate, create, or attach Prism visual artifacts.
Plan, generate externally, validate, then create or attach.
Artifact metadata, specs, validation results, save guidance, or embeds.
Avoid using it when
You are trying to preview live output through MCP; render externally first.
Advanced input contract
Agent hosts use this JSON Schema to validate the exact input shape.
View full registry notes
Create a private Prism visualization artifact in an existing library folder. Select the runtime explicitly: use artifactType react for TSX components, html for self-contained sandboxed HTML/CSS/inline JS, chart/table/metric_card/markdown for native Prism specs, or pythonSource only as a bounded generator that returns one of those safe artifact specs. This tool cannot load external resources, execute scripts outside Prism's sandbox, upload files, update, delete, or publish.
View JSON Schema
{
"type": "object",
"properties": {
"folderId": {
"type": "string",
"format": "uuid"
},
"documentId": {
"type": "string",
"format": "uuid"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 2000,
"description": "Optional plain-language description of what the artifact shows, its source basis, and how it should be used for later search and AI retrieval."
},
"artifactType": {
"type": "string",
"enum": [
"chart",
"table",
"metric_card",
"markdown",
"react",
"html",
"spreadsheet",
"presentation"
]
},
"spec": {
"type": "object",
"description": "For chart: { type, data, xKey, yKey, title?, color?, labels?: { xAxis?, series?: { [yKey]: label } } }; category/display labels support safe inline Markdown and y values stay numeric. For table: { columns, rows, title? }; column labels and string cells support safe inline Markdown. For metric_card: { metrics, title? }. For markdown: { content }. For spreadsheet: { schemaVersion: 1, sheets: [{ id, name, rowCount, columnCount, cells }], citations? }. For presentation: { schemaVersion: 1, aspectRatio: '16:9', slides: [{ id, layout, blocks, speakerNotes? }], citations? }. For react/html: { source, title?, libraryMedia?: [{ fileId, alt, caption?, sourceLabel? }] }; use window.PRISM_LIBRARY_MEDIA[fileId].url for authorized Library media.",
"examples": [
{
"source": "export default function App() { return <div>Project visualization</div> }"
},
{
"source": "<!DOCTYPE html><html><body><svg></svg></body></html>"
}
]
},
"pythonSource": {
"type": "string",
"description": "Optional bounded Python generator. Use by itself. Set PRISM_ARTIFACT or create_artifact() to return { artifactType, title?, spec }. Prism stores only the validated generated artifact, not Python as a live runtime."
}
},
"required": [
"folderId",
"title"
],
"additionalProperties": false
}