Skip to main content
Glama

Replace BrewPage publication content

update_publication
Destructive

Replace an existing publication by kind/target or private manageUrl to update its content, full site bundle, file URL, KV key, or server code; missing publications are not created.

Instructions

Replace an existing publication using its kind and target or private manageUrl. A site update fully replaces its file bundle. File updates fetch a public HTTP(S) URL. KV writes one key. lambda without content or files changes only the server code. A missing publication is never created.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "update_publication"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoPublication id, or a secret's 10-character ref
keyNoKV key. Excludes hosting.
urlNoPublic HTTP(S) URL fetched directly by the tool. No local download needed.
jsonNoPass objects/arrays directly: {"x":1}. Strings are stored as strings.
kindNoPublication kind returned by publish or list; secret with its ref as id
tagsNoTags. Updates accept tags only on HTML and sites
entryNoRequired for sites. Keep the existing entryFile unless changing it.
filesNoFull site bundle.
stateNoPage data configuration for HTML-format pages and sites. {} enables, null disables on update
valueNoString value for kind=kv
formatNoOmit to keep the saved format. Send html when replacing with HTML.
lambdaNoServer code for HTML-format pages and sites: the text of lambda.js, at most 32 KiB, with a BrewPage profile; never a site file. null removes it on update. Read get_guide topic lambda first
contentNoHTML, Markdown or code.
filenameNoOriginal filename.
verbatimNoPreserve inline source by default. False allows paste repair.
manageUrlNoPrivate link as target and proof.
namespaceNo
ownerTokenNoPrivate owner proof.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.5.1
    • addedInput schema / properties / lambda
      Added value: +{
      +  "description": "Server code for HTML-format pages and sites: the text of lambda.js, at most 32 KiB, with a BrewPage profile; never a site file. null removes it on update. Read get_guide topic lambda first",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed3 schema fields changedv3.3.1
    • addedInput schema / properties / id / description
      Added value: +"Publication id, or a secret's 10-character ref"
    • changedInput schema / properties / kind / description
      Previous value: -"Publication kind returned by publish or list"New value: +"Publication kind returned by publish or list; secret with its ref as id"
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "html",
      -  "site",
      -  "file",
      -  "json",
      -  "kv"
      -]New value: +[
      +  "html",
      +  "site",
      +  "file",
      +  "json",
      +  "kv",
      +  "secret"
      +]
  3. Addedv3.0.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is known; the description still earns credit for spelling out precisely what each kind destroys ('fully replaces its file bundle') and that nothing is ever created. It does not cover proof/ownership requirements in behavioral terms, though manageUrl is labeled as 'target and proof'.

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?

Five short sentences with no padding, and the core action plus addressing scheme are front-loaded. The telegraphic style ('KV writes one key.') is efficient but slightly clipped, which keeps it just below the top mark.

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 an 18-parameter, zero-required, kind-dispatching mutation tool this covers the essential decision space and destructive effects, and no output schema exists so return values need not be explained. Minor gaps remain around error behavior and secret/ownerToken proof semantics.

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

Parameters4/5

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

Schema coverage is 94%, so the baseline is 3, but the description adds cross-parameter meaning the schema cannot: that kind plus target determine applicability, that 'lambda without content or files changes only the server code', and that manageUrl acts as both target and proof. That is genuine value beyond the field-level descriptions.

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

Purpose5/5

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

The description opens with a specific verb+resource ('Replace an existing publication') and immediately states the addressing scheme ('kind and target or private manageUrl'). 'A missing publication is never created' distinguishes it from publish, which the agent could otherwise confuse it with.

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

Usage Guidelines4/5

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

Per-kind rules make the selection decision concrete: site updates replace the whole file bundle, file updates pull from a public HTTP(S) URL, kv writes one key, and lambda-only edits change server code alone. What is missing is any explicit routing to siblings such as publish or delete_publication as alternatives.

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