share_artifact
PUBLISHES analysis to a PUBLIC web page that ANYONE WITH THE LINK CAN READ — no sign-in, no account, not listed but not protected either. Treat calling this as pressing Publish on the user's behalf. Only call it when the user has explicitly asked to share, publish, or post this, and quote their words in user_request; if they have not, ask them first and tell them the page is public. A request to DOWNLOAD, EXPORT, or SAVE the data is NOT a request to publish it — return the data in your reply or as CSV instead, and expect this tool to refuse (#2212). When the user does want to publish, this is the native way to "make a presentation", "build a report/deck", "share this", or "post to LinkedIn/X/Reddit". USE THIS INSTEAD of generating a PDF, slide deck, or image file locally: it produces a live, interactive, branded web page (charts render with real Plotly), not a static file. Pass one chart as chart, or several as charts — each as the chart_id build_chart returned (preferred: a reference stays small, where several inlined figures can be truncated in transit), or as the chart object itself; rendered top to bottom — plus a title (headline shown on the page and the social preview card) and a note (markdown narrative tying the charts together). Call get_writing_style before composing that narrative: it is what keeps the page from reading as machine-written, and it carries the rule that every number must trace back to a query you ran. Returns {url, share_url}: url is the interactive page the user can OPEN AND EDIT (they can refine the title/wording and reorder/remove charts before posting); share_url is the link to post, which unfurls into a preview card. Tell the user they can edit the text on url before sharing, AND that the page is already public from this moment. The share is owned by the caller and revocable any time from the web app — though revoking cannot un-publish what someone already read. YOU must be signed in to create one; VIEWERS need no account, which is exactly why consent matters here. REVISING a page you already published: pass its token (or its URL) as token and send the whole write-up again. That rewrites the page at the SAME link, so a posted URL keeps working and no second page is left behind to revoke. Never republish a revision as a new page.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_request": "<user_request>"
},
"name": "share_artifact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Optional explanatory prose (markdown) for the simple `chart`/`charts` path — a caption or short narrative shown with the charts. For a full presentation where commentary is interspersed with the plots, put the prose in `text` blocks via `blocks` instead. The user can edit this text on the share page before posting to social media. | |
| chart | No | A single chart to publish: its `chart_id` from `build_chart` (preferred), or the chart object itself (`{renderer, title, figure}`). Fine for a quick one-chart-plus-caption share; use `blocks` for a real multi-chart presentation. Optional, but pass `blocks`, a chart (or `charts`), and/or a `note` — an empty share is rejected. | |
| title | No | Optional headline shown on the public page and in the social preview card (e.g. "SA wind vs price, last 30 days"). Keep it to 60 characters or fewer: search results cut anything longer. State the finding and its number, with no qualifiers and no teaser clause. | |
| token | No | Optional. An existing share to REWRITE, given as its `token` or the full share URL. Pass this whenever the user is iterating on a page you already published for them: the content below replaces what is on that page, the URL does not change, and no second page is created for them to revoke — so a link they have already posted keeps working and keeps improving. Omit it to publish a new page. An update REPLACES the page, so send the whole write-up again, not just the part that changed. `title` is the one exception: leave it out and the existing headline is kept. Charts must be live `chart_id`s from `build_chart` — ids expire after a day, so rebuild them if you are returning to an older page. | |
| blocks | No | PREFERRED for any multi-chart presentation: an ordered list of blocks rendered top to bottom exactly as given, so each plot sits next to the text that discusses it (a report/argument, not all charts stacked above all prose). Each block is either `{ "type": "text", "markdown": "…prose paragraph…" }` or `{ "type": "chart", "chart_id": "…" }` (PREFERRED — the `chart_id` `build_chart` returned) or, for a chart built elsewhere, `{ "type": "chart", "chart": { renderer, title, figure } }`. Typical shape: an intro text block, then one text block + one chart block per point, then a closing text block. When `blocks` is set it is the sole source of layout — `chart`/`charts`/`note` are ignored. Reference charts by id rather than pasting figures back: figures are large, and a multi-chart payload can be truncated in transit before it reaches this server. | |
| charts | No | Several charts on one page, each given as its `chart_id` from `build_chart` (preferred — e.g. `["3f2a…", "9c17…"]`) or as the chart object itself. Simple path only: charts render together, then `note` below them. For a report where prose and plots interleave, use `blocks` instead. Merged with `chart` if both are given. | |
| question_id | No | ||
| user_request | Yes | REQUIRED. The user's own words asking you to publish this, quoted verbatim — e.g. "share this on LinkedIn", "publish it", "make a report I can send round". This exists because publishing is irreversible in the way that matters: the page is world-readable the instant this returns, and revoking it later cannot un-see it. Quoting the request is how you check the user actually asked for a *public page* rather than for their data. If you cannot point at words like these, they did not ask to publish — stop and ask them first. A request to download, export, or save the data is not a request to publish it, and is rejected here (#2212). |