Skip to main content
Glama

Create Artifact

artifact-create

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

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: 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

TableJSON 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).
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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)."
  3. Added

TDQS

A4.9/5.0
Behavior5/5

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

The description goes well beyond the annotations, disclosing asynchronous behavior for generation types, immediate returns for own-code types, the inclusion of a read-write git token in the response, and the distinction between live app URLs versus markdown/asset artifacts. It even explains that a generated markdown import returns documentPreview fields. No annotation contradiction exists.

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

Conciseness4/5

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

The description is long, but the complexity justifies it. It is front-loaded with the most critical facts—never edits existing, do-not-use list, and the async warning—and organized with clear headers like 'type:' and 'Returns:'. There is minor redundancy around return handling, but overall it is structured well enough for an agent to extract actionable guidance without reading linearly.

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?

With no output schema, the description fully documents return values for both generation and own-code paths, including sessionId, previewUrl, gitRemoteUrl, revision, nextSteps, and fileCount. It also covers the polling workflow, the condition for calling artifact-get_git_token, and the URL behavior per artifactType, making the tool safe to invoke correctly in almost any situation.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds substantial cross-parameter meaning: it clarifies the easy-to-confuse type versus artifactType axes, per-type required fields, files/zipUploadId mutual exclusivity, workspaceId requirement conditions, and that name is ignored for p2c/l2c/f2c. This goes far beyond the schema's per-field descriptions.

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?

The description opens with a precise statement: 'Create a NEW artifact in Agent Grid; never edits an existing one.' It clearly specifies the verb, resource, and scope, and differentiates itself from artifact-edit, artifact-update_metadata, and artifact-publish by explicitly naming what it is not for.

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?

Usage guidance is exceptionally explicit: it names exact alternative tools for editing, metadata changes, and publishing, and instructs agents to poll artifact-status with { sessionId, wait: true } before replying. It also warns against calling artifact-create multiple times for the same generation request, removing ambiguity about when to use this tool versus siblings.

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.