create_report
Upload a new HTML report to Comma and get back an absolute share_url to give the user. By default anyone with the link can open the report (visibility='public'; share links are not indexed by search engines) and comment on it after a free sign-in (public_permission='comment'). Pass visibility='private' to keep it owner-only, or public_permission='view' for a read-only link. To include images or other files the HTML references by relative path (e.g. <img src="images/chart.png">), pass them in assets — they're uploaded and the HTML's relative refs are rewritten to public URLs automatically, all in this one call. Returns the report id, visibility, public_permission, and absolute edit_url (/r/:id) and share_url (/p/:id). Pass producer_name (e.g. 'Claude Code', 'Cursor') so the public share view can attribute the report to the agent that produced it. Only pass source_recipe.prompt when the user asks; it is shown to every viewer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Full HTML for the report (≤ 5 MB). | |
| title | No | Optional title. Defaults to 'Untitled report'. | |
| assets | No | Optional inline assets (images, fonts, CSS, JS, …) the HTML references by *relative* path. Each is uploaded and the report's matching relative refs (src/href/srcset/url(...)) are rewritten to the stored public URLs — so you can pass HTML containing `<img src="images/chart.png">` plus that asset in a single call instead of creating the report, uploading, and patching the HTML yourself. Re-uploading the same relative_path replaces it. | |
| visibility | No | Who can reach the share link. Defaults to 'public' (anyone with the link). 'registered' = any signed-in user; 'private' = owner only. For 'team' or 'domain' (company email, with allowed_email_domains) audiences, create then call set_report_sharing. | |
| description | No | Optional one-line description. | |
| producer_url | No | Optional http(s) URL the watermark chip links to (e.g. https://claude.ai/code). | |
| producer_name | No | Display name of the agent that produced this report (e.g. 'Claude Code', 'Cursor', 'ChatGPT'). Surfaced as a watermark chip on /p/:id. | |
| source_recipe | No | Structured payload (prompt + tools, etc.) the public viewer can use to re-run the same recipe on their own data. Convention: { prompt: string, tools?: string[] }. Shown to every viewer of the share link — only pass it when the user asks. | |
| producer_icon_url | No | Optional http(s) URL to a small square icon for the producer. | |
| public_permission | No | What link/anonymous visitors may do. Defaults to 'comment' (commenting needs a free sign-in). 'edit' needs a token with the 'sharing' scope. Ignored (forced to 'none') when visibility='private'. |