Skip to main content
Glama

Create Artifact

artifact-create

Create a NEW artifact in Agent Grid; never edits an existing one.

Building a new React app, HTML site or presentation yourself? Start from a template first. When the user asks for a new app, site, page or deck and has no code or file of their own, call artifact-list_templates and create it with artifact-create_from_template, then adapt it with artifact-explore + artifact-edit — do NOT write the project from scratch through type empty or import. The templates are maintained, working starters (Vite + React + TypeScript, plain HTML, an image-ready presentation), so the result builds and renders on the first try. Skip the template only when the user brings their own code, explicitly asks for something written from scratch, or wants Anima to generate it (p2c/l2c/f2c). If you are unsure, tell the user a template exists and offer it. Markdown documents and assets have no template: create them here as usual.

Two independent axes, easy to confuse: type (below) is where the files come from, and artifactType is what the artifact IS. artifactType defaults to app — a live web application that renders and runs at the returned URL as soon as it is ready, which is what every type below produces unless you say otherwise. Pass artifactType markdown for a readable document, or asset for a stored file: neither is a running app, so do not promise a live URL for them.

Generation types (p2c/l2c/f2c) run ASYNCHRONOUSLY: this returns IMMEDIATELY with { status: 'generating', sessionId, artifactUrl, previewUrl, playgroundUrl } while the app is still being built. The preview link shows a live loading screen that swaps in the finished app. Most of the time, you need a single call to artifact-status with { sessionId, wait: true }, BEFORE you reply to the user because it blocks until the app is ready or failed, so you report a finished app rather than a promise (if it returns still 'generating', call it again). This artifact-create tool is NOT meant to be called multiple times for the same generation request. While a matching job is active, the same stable request identity may reuse that job for the team instead of creating another. The own-code types (empty/import) return immediately.

Do NOT use for: a new React app, HTML site or presentation you would otherwise write yourself (artifact-create_from_template); editing an existing artifact (artifact-explore + artifact-edit, or the git flow via artifact-get_git_token); rename/visibility (artifact-update_metadata); deploying live (artifact-publish).

type: Anima GENERATES (async — poll artifact-status):

  • p2c: text prompt (requires prompt; optional guidelines)

  • l2c: website (requires url)

  • f2c: Figma frames (requires fileKey + nodesId + X-Figma-Token header) YOU supply (ready immediately):

  • empty: empty git repo you push to (requires framework)

  • import: your code is the first commit; EXACTLY ONE of files (inline text, up to roughly 100 KB) or zipUploadId (binaries or larger)

framework: only html and react exist. Required for empty; optional for import (detected from package.json) and generation types (default html).

Returns: generation types (p2c/l2c/f2c) → { success, status: 'generating', sessionId, artifactUrl, playgroundUrl, previewUrl }; poll artifact-status for completion. Own-code types (empty/import) → sessionId, revision, artifactUrl, name, gitRemoteUrl, access, expiresAt, nextSteps (plus fileCount, skippedFiles for import), and a read-write git token in the same response — so do NOT call artifact-get_git_token after creating. playgroundUrl comes only when artifactType is app; previewUrl renders those plus markdown artifacts, while asset artifacts expose only artifactUrl. A markdown inline-files import also returns documentPreview plus documentPreviewTruncated, so the preview card can render the bounded document text without a follow-up read. revision is the first commit: pass it straight to artifact-edit as baseRevision if you edit without git. These are ready immediately (no 'generating' status): previewUrl renders the committed files right away for import, and the seed README for empty.

Input Schema

NameRequiredDescriptionDefault
urlNoREQUIRED for l2c only. Website URL to convert to code.
nameNoDisplay name; applied by empty and import only (default "Untitled project"). p2c, l2c and f2c name the artifact from the generated content and IGNORE this. Rename any artifact afterwards via artifact-update_metadata.
typeYesWhere the code comes from. Anima GENERATES: p2c = text prompt (requires prompt); l2c = website URL (requires url); f2c = Figma frames (requires fileKey + nodesId + X-Figma-Token header). YOU supply: empty = empty git repo you push to (requires framework); import = your code as the first commit (EXACTLY ONE of files or zipUploadId). Starting a new React app, HTML site or presentation with no code of your own? Use artifact-create_from_template instead of empty or import, unless the user explicitly asks for one without a template.
filesNoimport only, inline transport: path-to-UTF-8-text map, becomes the first commit. TEXT only, up to roughly 100 KB of source; binaries or larger use zipUploadId via artifact-get_zip_upload_url. Mutually exclusive with zipUploadId.
promptNoREQUIRED for p2c only. Text prompt describing the UI to generate.
fileKeyNoREQUIRED for f2c only. Figma file key of the design; f2c also requires the X-Figma-Token header.
nodesIdNoREQUIRED for f2c only. Figma node IDs of the frames to convert.
stylingNoCSS strategy; generation types only, not empty or import. p2c: tailwind, css, inline_styles. l2c: tailwind, inline_styles, vanilla_css. f2c: tailwind, plain_css, css_modules, inline_styles.tailwind
languageNotypescript or javascript; generation types with framework react only, ignored otherwise. l2c output is always typescript.
frameworkNoONLY html and react exist. REQUIRED for empty (declare react if pushing React code). Optional for import (auto-detected from package.json) and for p2c/l2c/f2c (defaults to html).
uiLibraryNoOptional UI library; generation types with framework react only. l2c: shadcn only. f2c: mui, antd, shadcn, clean_react. Not for p2c.
guidelinesNoOptional, p2c only. Guidelines to steer generation (conventions, structure, libraries).
workspaceIdNoWhere to create it — an id from workspace-list_workspaces. Optional when you can create in only one workspace; otherwise required, since there is no default workspace.
zipUploadIdNoimport only: id from artifact-get_zip_upload_url, used AFTER HTTP PUTting the zip to its uploadUrl; for binaries or over roughly 100 KB of source. Single-use; valid within 30 minutes of the last upload. Mutually exclusive with files.
artifactTypeNoWhat the artifact IS, which decides how a human sees it. app (the default) = a running web page and needs an index.html among your files. markdown = a readable document and needs at least one .md file and no framework. Sending .md files as an app makes an artifact with nothing to render. asset = a stored image or video file; it can ONLY be created from a zipUploadId reserved with purpose "asset" via artifact-get_zip_upload_url — never from files. presentation = slides compiled from a Keynote (.key), PowerPoint (.pptx), OpenDocument (.odp) or PDF file; it can ONLY be created from a zipUploadId reserved with purpose "presentation", PUT as the presentation file itself (not zipped).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / type / description
      Previous value: -"Where the code comes from. Anima GENERATES: p2c = text prompt (requires prompt); l2c = website URL (requires url); f2c = Figma frames (requires fileKey + nodesId + X-Figma-Token header). YOU supply: empty = empty git repo you push to (requires framework); import = your code as the first commit (EXACTLY ONE of files or zipUploadId)."New value: +"Where the code comes from. Anima GENERATES: p2c = text prompt (requires prompt); l2c = website URL (requires url); f2c = Figma frames (requires fileKey + nodesId + X-Figma-Token header). YOU supply: empty = empty git repo you push to (requires framework); import = your code as the first commit (EXACTLY ONE of files or zipUploadId). Starting a new React app, HTML site or presentation with no code of your own? Use artifact-create_from_template instead of empty or import, unless the user explicitly asks for one without a template."
  2. Changed3 schema fields changed
    • changedInput schema / properties / artifactType / description
      Previous value: -"What the artifact IS, which decides how a human sees it. app (the default) = a running web page and needs an index.html among your files. markdown = a readable document and needs at least one .md file and no framework. Sending .md files as an app makes an artifact with nothing to render. asset = a stored image or video file; it can ONLY be created from a zipUploadId reserved with purpose \"asset\" via artifact-get_zip_upload_url — never from files."New value: +"What the artifact IS, which decides how a human sees it. app (the default) = a running web page and needs an index.html among your files. markdown = a readable document and needs at least one .md file and no framework. Sending .md files as an app makes an artifact with nothing to render. asset = a stored image or video file; it can ONLY be created from a zipUploadId reserved with purpose \"asset\" via artifact-get_zip_upload_url — never from files. presentation = slides compiled from a Keynote (.key), PowerPoint (.pptx), OpenDocument (.odp) or PDF file; it can ONLY be created from a zipUploadId reserved with purpose \"presentation\", PUT as the presentation file itself (not zipped)."
    • changedInput schema / properties / artifactType / enum
      Previous value: -[
      -  "app",
      -  "markdown",
      -  "asset"
      -]New value: +[
      +  "app",
      +  "markdown",
      +  "asset",
      +  "presentation"
      +]
    • changedInput schema / properties / zipUploadId / pattern
      Previous value: -"^(asset-)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"New value: +"^((asset|presentation)-)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
  3. Changed1 schema field changed
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "description": "Where to create it — an id from workspace-list_workspaces. Optional when you can create in only one workspace; otherwise required, since there is no default workspace.",
      +  "type": "string"
      +}
  4. Changed4 schema fields changed
    • changedInput schema / properties / artifactType / description
      Previous value: -"What the artifact IS, which decides how a human sees it. app (the default) = a running web page and needs an index.html among your files. knowledge = a knowledge artifact; behaves exactly like app today. markdown = a readable document and needs at least one .md file and no framework. Sending .md files as an app makes an artifact with nothing to render."New value: +"What the artifact IS, which decides how a human sees it. app (the default) = a running web page and needs an index.html among your files. markdown = a readable document and needs at least one .md file and no framework. Sending .md files as an app makes an artifact with nothing to render. asset = a stored image or video file; it can ONLY be created from a zipUploadId reserved with purpose \"asset\" via artifact-get_zip_upload_url — never from files."
    • changedInput schema / properties / artifactType / enum
      Previous value: -[
      -  "app",
      -  "markdown",
      -  "asset",
      -  "knowledge"
      -]New value: +[
      +  "app",
      +  "markdown",
      +  "asset"
      +]
    • changedInput schema / properties / files / description
      Previous value: -"import only, inline transport: path-to-UTF-8-text map, becomes the first commit. TEXT only, up to roughly 100 KB of source; binaries or larger use zipUploadId via artifact-get_zip_upload_url. Mutually exclusive with zipUploadId. Omit both (with artifactType: knowledge) to seed from Anima's knowledge-base template instead of supplying your own files."New value: +"import only, inline transport: path-to-UTF-8-text map, becomes the first commit. TEXT only, up to roughly 100 KB of source; binaries or larger use zipUploadId via artifact-get_zip_upload_url. Mutually exclusive with zipUploadId."
    • changedInput schema / properties / type / description
      Previous value: -"Where the code comes from. Anima GENERATES: p2c = text prompt (requires prompt); l2c = website URL (requires url); f2c = Figma frames (requires fileKey + nodesId + X-Figma-Token header). YOU supply: empty = empty git repo you push to (requires framework); import = your code as the first commit (EXACTLY ONE of files or zipUploadId — both optional when artifactType is knowledge, which seeds from Anima's knowledge-base template instead)."New value: +"Where the code comes from. Anima GENERATES: p2c = text prompt (requires prompt); l2c = website URL (requires url); f2c = Figma frames (requires fileKey + nodesId + X-Figma-Token header). YOU supply: empty = empty git repo you push to (requires framework); import = your code as the first commit (EXACTLY ONE of files or zipUploadId)."
  5. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only supply generic hints (not read-only, non-idempotent, open-world); the description adds the material behavior: generation types return immediately with status 'generating' and must be polled, while empty/import return ready-state payloads including a read-write git token (so artifact-get_git_token is unnecessary), plus duplicate-request job reuse semantics. It also discloses how each artifactType is surfaced to a human (playgroundUrl/previewUrl availability), which no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the highest-stakes routing advice and structurally organized by type and return value, which is good. However, it repeats the p2c/l2c/f2c parameter requirements already enumerated in the 'type' property description and again in the schema's type entry, and the verbosity could be trimmed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter, five-mode creation tool with no output schema, the description covers the async/ready split, the full return payload of each branch, how to obtain the zipless vs zip input, and the required follow-up call. Nothing an agent needs to invoke it correctly and report accurately to the user is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so individual parameter meanings are already documented; the description's added value is the disambiguation of the two confusable axes (type = source of files, artifactType = what the artifact is) and the cross-parameter constraints (EXACTLY ONE of files/zipUploadId, framework required only for empty). A few per-field details (styling/language/uiLibrary matrices) are restated rather than extended beyond the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and scope: 'Create a NEW artifact in Agent Grid; never edits an existing one,' which immediately separates it from artifact-edit and artifact-update_metadata. The subsequent section names the exact inputs each type consumes, so an agent can identify the correct entry point without opening the sibling schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: use artifact-create_from_template + artifact-explore + artifact-edit for a new React/HTML/presentation build, with named exceptions (user-supplied code, from-scratch request, p2c/l2c/f2c). The 'Do NOT use for' block enumerates four sibling alternatives by name, and it even prescribes the follow-up call (artifact-status with wait: true before replying).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.