publish_url
STORES the payload server-side and returns a SHORT shareable link. Opt-in only: requires acknowledge_storage=true — confirm with the user first that they accept operator-hosted storage (ONE WEEK retention on the public tier, revocable earlier via the returned delete_token; anyone with the link can view). target "play" (default) renders in the a2uicatalog playground by reference (no URL size ceiling); target "gas" makes the short link redirect to the public Apps Script renderer. For storage in the USER's own account use emit_deployment; for nothing-stored links use preview_url.
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": {
"payload": "<payload>",
"acknowledge_storage": "<acknowledge_storage>"
},
"name": "publish_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | optional vanity name for the link (/s/<alias>) — first-come, frees when the link expires | |
| target | No | Where the short link opens: "play" (default) the a2uicatalog playground by reference, "gas" the public Apps Script renderer. | |
| payload | Yes | The A2UI payload to store and share: {title, theme, blocks:[...]}, up to 100 KB serialised. | |
| ttl_days | No | OPERATOR-ONLY (authenticated requests): retention override; 0 = permanent. Public tier is fixed at one week. | |
| acknowledge_storage | Yes | MUST be true — affirms the user consented to server-side storage |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True when the payload was stored. | |
| note | No | Retention and viewing notes. | |
| error | No | Why nothing was stored (present when ok is false, e.g. daily limit). | |
| target | No | "play" or "gas". | |
| short_url | No | Short shareable link. | |
| delete_token | No | Pass to unpublish_url to revoke. | |
| stored_until | No | Expiry date (YYYY-MM-DD) or "permanent". |