Publish KV entry
publish_kvPublish a key/value entry to BrewPage and receive a share link plus owner token; configure private namespaces, passwords, tags, and TTL-based expiry.
Instructions
Publish a key/value entry to BrewPage. Creates a KV store; the entry is addressed by (namespace, id, key). Max 1 MiB per value, 1,000 keys per store; the key name hosting is reserved. Returns its primary share link and owner token. Returns manageUrl, a private management link (grants control; not for public sharing). Secrets allowed; likely ones are flagged in notices. Private namespace + password suit secrets. BrewPage tokens and manage links must never be in public content.
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": {
"key": "<key>",
"value": "<value>"
},
"name": "publish_kv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | KV key (first part of the (namespace, id, key) addressing tuple) | |
| tags | No | Optional tags for the KV entry | |
| value | Yes | KV value | |
| ttlDays | No | TTL in days: up to 30 days without an account, up to 90 with a free profile (pass an ownerToken held in the profile); a default applies when omitted. Accepts whole days: 15, '15d', '15 days'. The returned expiresAt is the actual expiry. | |
| password | No | Optional password to protect the KV store | |
| namespace | No | Omit (default): private. namespace=public: the shared public namespace. JSON and KV are never listed in the gallery or indexed, in any namespace; anyone who has the link can open it. Lowercase only: 1-32 of a-z, 0-9, hyphen. | |
| ownerToken | No | Optional; the ownerToken from your first create keeps publications under one owner. Default: env BREWPAGE_OWNER_TOKEN (local server only), else a new token per create. | |
| deliveryMode | No | Optional delivery choice for a fresh publication, independent of password/namespace. Fresh sites and HTML-format pages outside public (including the default unlisted namespace) always use subdomain; an explicit path there still publishes, on subdomain, with a delivery notice. Everything else in any namespace (Markdown, code/text, files, JSON, KV, public HTML) defaults to path (Promotion); public HTML may automatically choose subdomain for browser features. When creation returns an existing publication, it keeps its actual mode and URL. |