Set Data Slot
set_data_slotCreates or updates a mutable JSON data slot (max 2 MB) that display HTML fetches via its readUrl — the live-data backbone for store templates. The slug is stable; reusing it updates in place. type 'value' stores JSON verbatim; 'aggregate' composes up to 32 sources ({slot:'name'} or one {prefixMatch:'agent-'}) within the same personal/group scope. Requires content scope. Returns slug, readUrl and size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Stable slug for the data slot. Must match ^[A-Za-z0-9_-]{8,64}$. Same slug on a later call updates the existing slot. Slug stays exactly as supplied; the public URL uses a separate server-generated PublicId so the slug itself is never sensitive. | |
| type | No | Slot kind. 'value' (default) stores 'content' verbatim. 'aggregate' stores 'content' as a composite-slot definition. Immutable after creation. | |
| label | No | Human-readable label (max 200 chars). Required when creating a new slot; optional on update. | |
| content | Yes | JSON content to store. For value slots: any valid JSON value up to 2 MB. For aggregate slots: a definition object { sources: [{slot,as?} | {prefixMatch}], onMissing?, onInvalidJson?, includeMeta?, staleAfterMs?, output? }. | |
| group_id | No | Group/organization ID for shared group slots. Omit for personal slots. | |
| access_token | No | Optional bearer token; prefer session_request_id. | |
| session_request_id | No | Session handle from create_auth_session; pass it on every authenticated call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | ||
| type | No | ||
| label | No | ||
| groupId | No | ||
| readUrl | No | ||
| sizeBytes | No | ||
| updatedAt | No |