Skip to main content
Glama

Publish JSON document

publish_json

Publish a JSON document (max 1 MiB). Returns the share link, the owner token and manageUrl (private: its holder can edit or delete). Owner tokens and management links never go into published 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": {
      "json": "<json>"
    },
    "name": "publish_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesObject, array or JSON text
tagsNo
ttlDaysNoDays to keep it: up to 30 days without an account, up to 90 with a free profile (an ownerToken held in the profile). Omitted: the default. The result states the expiry.
passwordNo
namespaceNoOmit (default): private. `public`: the shared public namespace. JSON and KV are never listed in the gallery or indexed; anyone with the link can open it. A custom name: 1-32 of a-z, 0-9, hyphen.
ownerTokenNoOwner token of an earlier create

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / deliveryMode
      Removed value: -{
      -  "description": "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.",
      -  "enum": [
      -    "path",
      -    "subdomain"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / json / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "additionalProperties": {},
      -    "propertyNames": {
      -      "type": "string"
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "items": {},
      -    "type": "array"
      -  }
      -]
    • changedInput schema / properties / json / description
      Previous value: -"JSON document to publish (object, array, or JSON-encoded string)"New value: +"Object, array or JSON text"
    • addedInput schema / properties / json / type
      Added value: +[
      +  "object",
      +  "array"
      +]
    • changedInput schema / properties / namespace / description
      Previous value: -"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."New value: +"Omit (default): private. `public`: the shared public namespace. JSON and KV are never listed in the gallery or indexed; anyone with the link can open it. A custom name: 1-32 of a-z, 0-9, hyphen."
    • changedInput schema / properties / ownerToken / description
      Previous value: -"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."New value: +"Owner token of an earlier create"
    • removedInput schema / properties / password / description
      Removed value: -"Optional password to protect the document"
    • removedInput schema / properties / tags / description
      Removed value: -"Optional tags for the document"
    • removedInput schema / properties / ttlDays / anyOf
      Removed value: -[
      -  {
      -    "exclusiveMinimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "maxLength": 32,
      -    "minLength": 1,
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / ttlDays / description
      Previous value: -"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."New value: +"Days to keep it: up to 30 days without an account, up to 90 with a free profile (an ownerToken held in the profile). Omitted: the default. The result states the expiry."
    • addedInput schema / properties / ttlDays / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / ttlDays / type
      Added value: +"number"
  2. Changed1 schema field changed
    • changedInput schema / properties / ttlDays / description
      Previous value: -"Requested TTL: days as a number, or a string such as '2w', '36h' or '1 month' (default 15 days). The server rounds to whole days and clamps to the allowed range (1-30; up to 90 with an owner token in a profile), reporting each adjustment in notices; the returned expiresAt is the actual expiry."New value: +"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."
  3. Changed1 schema field changed
    • changedInput schema / properties / ownerToken / description
      Previous value: -"Optional. Default: env BREWPAGE_OWNER_TOKEN (local server only), else a new token per create."New value: +"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."
  4. Changed1 schema field changed
    • changedInput schema / properties / ttlDays / description
      Previous value: -"Requested TTL: days as a number, or a string such as '2w', '36h' or '1 month' (default 15 days). The server rounds to whole days and clamps to the allowed range (1-30 by default; owner caps differ), reporting each adjustment in notices; the returned expiresAt is the actual expiry."New value: +"Requested TTL: days as a number, or a string such as '2w', '36h' or '1 month' (default 15 days). The server rounds to whole days and clamps to the allowed range (1-30; up to 90 with an owner token in a profile), reporting each adjustment in notices; the returned expiresAt is the actual expiry."
  5. Changed1 schema field changed
    • changedInput schema / properties / ownerToken / description
      Previous value: -"Optional. Default: BREWPAGE_OWNER_TOKEN, else a new token per create."New value: +"Optional. Default: env BREWPAGE_OWNER_TOKEN (local server only), else a new token per create."
  6. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / json / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  },
      -  {
      -    "items": {},
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "items": {},
      +    "type": "array"
      +  }
      +]
  7. Changed1 schema field changed
    • changedInput schema / properties / ttlDays / description
      Previous value: -"Requested TTL: days as a number, or a string such as '2w', '36h' or '1 month' (default 15 days). The server rounds to whole days and clamps to the allowed range (1-30 by default; owner caps differ), reporting each adjustment in notices; use returned expiresAt."New value: +"Requested TTL: days as a number, or a string such as '2w', '36h' or '1 month' (default 15 days). The server rounds to whole days and clamps to the allowed range (1-30 by default; owner caps differ), reporting each adjustment in notices; the returned expiresAt is the actual expiry."
  8. First observed

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint=false, destructiveHint=false) the description discloses the 1 MiB cap, the three return artifacts (share link, owner token, manageUrl), and the important security rule that tokens and management links are never embedded in published content. It does not cover what a password or namespace choice does to access, but the security-sensitive behavior is well surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the action and size limit, then return values, then the security caveat. Every clause carries information; no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a write tool with no output schema, the description explains the return payload, which is the main gap it needed to fill, and adds a safety warning. Remaining omissions are mostly parameter-level details already covered by the 67% schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, so most parameters are already documented in the schema (ttlDays and namespace have rich descriptions there). The description adds meaning only for ownerToken by explaining that its holder can edit or delete, and says nothing about tags, password, or namespace semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Publish a JSON document (max 1 MiB)" gives a specific verb and resource plus a hard constraint. It is distinguishable from publish_html/publish_file by the payload type, though the description never explicitly names those siblings as alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this versus update_json, publish_file, or publish_html, and no mention that supplying an existing ownerToken re-publishes under that ownership. Usage must be inferred from the tool name and parameter names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.