Skip to main content
Glama

artifacts_create

Host a self-contained HTML page at a stable, default-private, shareable URL — the Artifact experience, in-app.

Pass exactly one of:

  • html — the full page: your <body> plus any <style>/<script>. Unlike documents.create, the page is served live (JavaScript runs), so charts, interactivity, and small tools work.

  • file_id — a workspace file whose contents are already the HTML page.

  • analytics_card_ids — ids of saved analytics dashboard cards; the platform re-runs their queries and composes one designed report page (static charts, snapshot at build time). Best way to give someone a shareable analytics report.

The page runs in a locked-down sandbox: a dedicated origin + a strict CSP. That means it is fully self-contained — it CANNOT call out to the network (fetch/XHR/WebSocket are blocked) or load anything from a CDN. Inline all assets: CSS/JS inline, images/fonts as data: URIs. Draw charts yourself as inline SVG (no external chart library).

access_level defaults to 'private' (viewable only in-app). Set 'shared' to make the unguessable link itself the capability (anyone-with-link). You can flip this later with artifacts.set_access.

Returns {artifact_id, slug, url, app_url, version, access_level}. app_url always opens for workspace members, in the app. url is the public link and is set ONLY for a shared artifact (a private one has no public page: handed out bare, the public link answers "not available"). Republish with artifacts.update — both links stay the same.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlNoFull self-contained HTML page. Mutually exclusive with file_id.
titleYesShort human-readable title (page <title> + gallery label).
faviconNoOptional emoji used as the browser-tab icon (e.g. '📊').
file_idNoWorkspace file whose contents are the HTML page. Mutually exclusive with html.
templateNoOptional data-driven template: HTML with {{placeholder}} tokens. When set, later artifacts.refresh(data={...}) re-renders the page server-side from tiny data payloads (no HTML round-trip) — ideal for a scheduled agent that refreshes live numbers. The initial html you pass should be this template already rendered with today's values.
descriptionNoOptional one-line summary for the gallery card.
access_levelNo'private' (default, in-app only) or 'shared' (anyone-with-link).private
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
analytics_card_idsNoCompose saved analytics dashboard cards into one report page: each card's SQL re-runs through the guarded analytics engine and renders as a static chart. Data is a snapshot at build time. Mutually exclusive with html/file_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • addedInput schema / properties / template
      Added value: +{
      +  "description": "Optional data-driven template: HTML with {{placeholder}} tokens. When set, later artifacts.refresh(data={...}) re-renders the page server-side from tiny data payloads (no HTML round-trip) — ideal for a scheduled agent that refreshes live numbers. The initial html you pass should be this template already rendered with today's values.",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / analytics_card_ids / description
      Previous value: -"Reserved: compose saved analytics cards into the page. Not yet active — pass html for now."New value: +"Compose saved analytics dashboard cards into one report page: each card's SQL re-runs through the guarded analytics engine and renders as a static chart. Data is a snapshot at build time. Mutually exclusive with html/file_id."
  6. Added

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the locked-down sandbox, strict CSP, blocked network calls, self-contained asset requirements, default-private access semantics, and how shared versus private URLs behave. It also documents the returned fields and clarifies that update preserves both links.

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

Conciseness5/5

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

Front-loads the core action and URL behavior, then uses compact bullets for the mutually exclusive inputs and a short paragraph for sandbox and access semantics. Despite its length, every sentence conveys operational detail needed to call the tool correctly.

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 9-parameter write tool with no output schema, the description is complete: it clarifies mutual exclusivity, access modes, sandbox constraints, template behavior, and return fields. Nothing an agent needs in order to invoke it correctly appears to be 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?

With 100% schema description coverage, the baseline is 3, but the description adds important cross-parameter semantics: exactly one of html/file_id/analytics_card_ids, live rendering for html, and template behavior for server-side refresh. It does not add meaning for every minor parameter (e.g., favicon, in_workspace), which are left entirely to the schema.

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?

States a specific verb and resource: hosting a self-contained HTML page at a stable, default-private, shareable URL. It directly distinguishes itself from documents.create by noting the page is served live with JavaScript running, and names the main input modes (html, file_id, analytics_card_ids).

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 says to pass exactly one of the three input modes and gives the condition for choosing analytics_card_ids ('Best way to give someone a shareable analytics report'). It also routes follow-up actions to named siblings: flip access with artifacts.set_access and republish with artifacts.update.

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.