Skip to main content
Glama

Update JSON document

update_json
DestructiveIdempotent

Replace an existing JSON document.

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": {
      "namespace": "<namespace>",
      "id": "<id>",
      "json": "<json>"
    },
    "name": "update_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
jsonYesObject, array or JSON text
namespaceYes
ownerTokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / id / description
      Removed value: -"Document ID"
    • 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: -"New JSON document (object, array, or JSON-encoded string)"New value: +"Object, array or JSON text"
    • addedInput schema / properties / json / type
      Added value: +[
      +  "object",
      +  "array"
      +]
    • removedInput schema / properties / namespace / description
      Removed value: -"Document namespace"
    • removedInput schema / properties / ownerToken / description
      Removed value: -"Owner token from create. Default: env BREWPAGE_OWNER_TOKEN (local server only)."
  2. Changed1 schema field changed
    • changedInput schema / properties / ownerToken / description
      Previous value: -"Owner token from create. Default: BREWPAGE_OWNER_TOKEN."New value: +"Owner token from create. Default: env BREWPAGE_OWNER_TOKEN (local server only)."
  3. 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"
      +  }
      +]
  4. First observed

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, covering the safety profile. The word "Replace" adds meaningful semantics beyond that: existing content is overwritten wholesale rather than merged, so unspecified fields are lost. However, nothing is said about permissions, ownerToken implications, or what happens when the target document does not exist.

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

Conciseness3/5

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

A single front-loaded sentence with no filler, which is structurally clean. The problem is under-specification rather than verbosity: the brevity leaves real gaps for a destructive mutation tool.

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

Completeness2/5

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

This is a destructive, multi-parameter mutation with 25% schema coverage and no output schema, so the description should carry substantial weight. Instead it omits the meaning of namespace and id (what document is identified), the role of ownerToken (auth), and the failure/overwrite behavior, which are exactly what an agent needs to invoke it safely.

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

Parameters2/5

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

Schema description coverage is only 25%, with just the json parameter documented (and that description is appended in the schema, not the tool text). The description says nothing about namespace, id, or ownerToken, so it fails to compensate for the undocumented parameters.

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?

"Replace an existing JSON document" supplies a specific verb (replace) and resource (JSON document), so an agent knows the operation is a full overwrite of a stored JSON blob. It does not differentiate from siblings like publish_json or set_kv, leaving ambiguity about which storage tool is appropriate.

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 guidance on when to use this tool rather than publish_json, set_kv, or set_page_data, and no prerequisites or exclusions are stated. The agent must infer the selection criteria entirely.

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.