publish_artifact
Upload and publish React components, SVGs, or Mermaid diagrams to your GitHub Pages portfolio using TOYBOX. Artifacts are identified by unique slug-based IDs with UUID suffixes for easy management and sharing.
Instructions
Publish a new artifact to your TOYBOX. Artifacts are uniquely identified by a slug-based ID with UUID suffix.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | The React component code for the artifact (do not include React import - uses new JSX transform) | |
metadata | Yes |
Input Schema (JSON Schema)
{
"properties": {
"code": {
"description": "The React component code for the artifact (do not include React import - uses new JSX transform)",
"type": "string"
},
"metadata": {
"properties": {
"createdAt": {
"description": "ISO date string",
"type": "string"
},
"description": {
"description": "Optional description",
"type": "string"
},
"folder": {
"description": "Optional folder grouping",
"type": "string"
},
"slug": {
"description": "URL-friendly identifier in lowercase kebab-case (e.g., \"my-component\", \"todo-app\"). Only lowercase letters, numbers, and hyphens allowed.",
"type": "string"
},
"tags": {
"description": "Optional tags",
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"description": "Display title for the artifact (can include any characters, emojis, etc.)",
"type": "string"
},
"type": {
"description": "Artifact type",
"enum": [
"react",
"svg",
"mermaid"
],
"type": "string"
},
"updatedAt": {
"description": "ISO date string",
"type": "string"
}
},
"required": [
"title",
"slug",
"type",
"createdAt",
"updatedAt"
],
"type": "object"
}
},
"required": [
"code",
"metadata"
],
"type": "object"
}