All tools
ToolWrite

Create visualization artifact

create_visualization_artifact

Create a structured visualization artifact after its data and format have been validated.

When to use it

You need to discover, read, validate, create, or attach Prism visual artifacts.

Typical workflow

Plan, generate externally, validate, then create or attach.

What it returns

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 Prism visualization artifact from a completed artifact plan and validated payload. Use target library with library:write, or target article_draft with drafts:write. For precise article placement, pass the returned artifact id to insert_article_visual_block. Hermes or the AI client should render and inspect live previews externally, then pass previewInspection for auditability. This reuses Prism's existing artifact validation, storage, and draft embed model.

View JSON Schema
{
  "type": "object",
  "properties": {
    "target": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "library"
            },
            "folderId": {
              "type": "string",
              "format": "uuid"
            },
            "documentId": {
              "type": "string",
              "format": "uuid"
            }
          },
          "required": [
            "type",
            "folderId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "article_draft"
            },
            "documentId": {
              "type": "string",
              "format": "uuid"
            }
          },
          "required": [
            "type",
            "documentId"
          ],
          "additionalProperties": false
        }
      ]
    },
    "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": "Validated Prism artifact spec. For react/html, pass the final inspected source. For native artifacts, pass Prism's chart/table/metric_card/markdown spec shape."
    },
    "pythonSource": {
      "type": "string",
      "description": "Optional bounded Python generator. Use by itself. Prism stores only the validated generated artifact."
    },
    "creationPlanSummary": {
      "type": "string",
      "maxLength": 4000
    },
    "previewInspection": {
      "type": "object",
      "properties": {
        "rendered": {
          "type": "boolean"
        },
        "tool": {
          "type": "string",
          "maxLength": 120
        },
        "summary": {
          "type": "string",
          "maxLength": 2000
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 20
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "target",
    "title"
  ],
  "additionalProperties": false
}

Useful next tools