Tools · Documents and apps

build_artifact

Can wait for approval

Create a deliverable (report, page, code, diagram, data) with a stable id, then update or rewrite it; every change is saved as a new version.

When to use: Use this when the user needs a deliverable rather than only conversational text; keep one id per deliverable and update it.

Example

Run for real by scripts/tool-examples.py in a small demo project, with Haiku 5.5 where the tool calls a model. The output is exactly what the tool returned.

The call

tool call
{
  "tool": "build_artifact",
  "arguments": {
    "id": "plans-table",
    "action": "create",
    "title": "Plans",
    "type": "markdown",
    "content": "| Plan | Seats | Price |\n|---|---|---|\n| Starter | 1–10 | $12 |\n| Team | 10+ | $29 |\n"
  }
}

Real output

Created artifact 'plans-table' v1 (markdown, 4 lines): <project>/.shipit_workspace/plans-table/v1.md

Parameters

NameTypeDescription
id*stringStable short name, e.g. 'q3-report'. Reuse it to change the artifact.
actionstringcreate (default), update (replace exact text), or rewrite (replace all).createupdaterewrite
titlestringHuman-readable title.
typestringWhat the content is.markdownhtmlsvgmermaidjsoncsvtextcode
languagestringFor type=code, e.g. 'python'.
contentstringFull content, for create and rewrite.
old_textstringFor update: exact text to replace, unique in the artifact.
new_textstringFor update: the replacement.

* required

Build documents, dashboards and small apps people can open.