Tools · Documents and apps
build_document
Can wait for approvalCreate a polished PDF report, Excel workbook, Word document, PowerPoint deck, or styled HTML page from structured content.
When to use: Use this whenever the user wants a shareable deliverable — a report, spreadsheet, deck, or doc — rather than chat text.
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.
What it rendered
rendered output
The call
{
"tool": "build_document",
"arguments": {
"kind": "html",
"title": "Pricing brief",
"sections": [
{
"heading": "Summary",
"body": "Seat-based pricing with two plans; annual billing ships in 0.2.0."
},
{
"heading": "Plans",
"table": {
"headers": [
"Plan",
"Per seat / month"
],
"rows": [
[
"Starter",
"$12"
],
[
"Team",
"$29"
]
]
}
},
{
"heading": "Next",
"bullets": [
"Enterprise tier",
"Usage-based add-ons"
]
}
]
}
}Real output
Created HTML 'Pricing brief' → <project>/.shipit_workspace/documents/pricing_brief.html (849 bytes)
Parameters
| Name | Type | Description |
|---|---|---|
| kind* | string | Output formatdocxhtmlpdfpptxxlsx |
| title* | string | — |
| sections | array | Document content (pdf/docx/pptx/html). For pptx each section is one slide. |
| sheets | array | Workbook content (xlsx only). Cell strings starting with '=' become live formulas. |
| path | string | Optional output path; defaults to the workspace with a name derived from title. |
* required
More in Documents and apps
Build documents, dashboards and small apps people can open.