Skip to main content
Glama

Change a knowledge entry

update_knowledge
DestructiveIdempotent

Saves a new version of a knowledge entry with a new kind, title and body (send all three, the whole entry). Every earlier version stays in its history and can be brought back with restore_knowledge_version. Send the newest version number you read; if someone saved a newer version since, nothing is saved and the answer is stale with the newest number.

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": {
      "knowledge_id": "<knowledge_id>",
      "expected_version": "<expected_version>",
      "kind": "<kind>",
      "title": "<title>",
      "body": "<body>"
    },
    "name": "update_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe entry itself, in Markdown. Headings split it into the passages a search finds, so give each topic its own heading.
kindYesWhat the entry is, such as note, decision, house-rule, glossary, faq, brand-voice or style-guide (list_knowledge_kinds gives every kind and when to use it).
titleYesA short title that says what the entry is about.
applies_toNoWhat part of the project the entry is about, such as a house rule for the shop pages only. A part or service needs project_id; an area works for the workspace too. null: the whole project (or every project). Left out on update_knowledge, the entry keeps what it had.
project_idNoThe project the entry is in. May be left out: the entry's id finds its own project or the workspace.
knowledge_idYesThe entry (list_knowledge and search_knowledge give ids).
workspace_idNoWorkspace id from whoami; omit when there is one.
expected_versionYesThe entry's newest version number when you read it (read_knowledge or list_knowledge_versions gives it). If someone saved a newer version since, nothing changes and the answer is stale with the newest number: read the entry again first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / applies_to
      Added value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "id": {
      +          "description": "The part's or service's id (get_project_brief's topology lists them), or the area.",
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "kind": {
      +          "description": "component: one part of the project; resource: one service it uses; area: frontend, backend, data_storage, auth_access, infrastructure, integrations, observability, security, docs or tooling.",
      +          "enum": [
      +            "component",
      +            "resource",
      +            "area"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "id"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "What part of the project the entry is about, such as a house rule for the shop pages only. A part or service needs project_id; an area works for the workspace too. null: the whole project (or every project). Left out on update_knowledge, the entry keeps what it had."
      +}
    • changedInput schema / properties / kind / description
      Previous value: -"What the entry is, such as note, decision, glossary, faq, brand-voice or style-guide (list_knowledge_kinds gives every kind and when to use it)."New value: +"What the entry is, such as note, decision, house-rule, glossary, faq, brand-voice or style-guide (list_knowledge_kinds gives every kind and when to use it)."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag this as a non-read, idempotent, destructive write; the description adds the crucial nuance that earlier versions persist in history and are restorable, which reframes the 'destructive' hint. It also discloses the optimistic-concurrency outcome in detail: a newer existing version means nothing is saved and the response reports staleness with the newest number. Missing only permission/authorization notes.

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 tightly packed sentences, front-loaded with the action and followed by retention and concurrency rules; no filler. The density of nested clauses ('if someone saved a newer version since, nothing is saved and the answer is stale') costs a little readability but each clause carries operational meaning.

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 8-parameter mutation with no output schema, the description covers what changes, what is preserved, what happens on conflict, and implies the response carries the current version number. It does not describe the success response shape or authorization requirements, which leaves a small gap given there is no output schema.

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 100%, so the baseline is 3; the description earns more by establishing full-replacement semantics for kind, title and body (the whole entry must be resent) and by explaining the conflict meaning of expected_version, which the schema only describes locally. The distinction from a partial patch is genuinely added information.

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?

States a specific verb and resource ('Saves a new version of a knowledge entry') plus the exact fields replaced, and its versioning framing distinguishes it from a plain add. It also names restore_knowledge_version as the counterpart path, so the agent can separate write-new-version from roll-back without opening either schema.

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?

Gives a concrete usage rule ('send all three, the whole entry') and routes the agent to restore_knowledge_version when the goal is to bring back an earlier version. It does not explicitly contrast with add_knowledge, but the 'new version' framing and the read-before-write instruction cover the main decision point.

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.

Resources