Skip to main content
Glama

kb_documents_update

Idempotent

Save a new revision of an existing document. Omit title/body_md/project_slug/group_slugs to preserve existing values. Pass expected_revision_id for optimistic-concurrency protection; omit for last-write-wins. Returns no_changes=true (and inserts no revision) when the save would change nothing.

Input Schema

NameRequiredDescriptionDefault
titleNoNew title; preserves existing if absent
body_mdNoNew markdown body; preserves existing if absent
document_idYesDocument id (required)
group_slugsNoReplace group set; [] to clear all groups
tenant_slugNoTenant slug to target. Required when your token grants several workspaces; omit when it grants one. If you omit it with several, the refusal names your default workspace; call kb_tenants_list to see every workspace the token grants.
include_bodyNoInclude the full document body_md (default false; you already hold the body you sent - the returned current_revision_id confirms the save).
project_slugNoMove to project; null to remove from project
document_dateNoISO 8601 date (YYYY-MM-DD) representing the date the document content is from. Omit to preserve the existing value; pass null explicitly to clear a previously-set date.
expected_revision_idNoOptimistic-concurrency precondition

Output Schema

NameRequiredDescriptionDefault
documentYes
no_changesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (readOnly=false, idempotent=true, destructive=false), the description discloses that every save inserts a revision, that the default mode is last-write-wins, and that a no-op save returns no_changes=true without inserting a revision. That is genuine behavioral context. It does not mention permission requirements or the tenant-ambiguity refusal path.

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

Conciseness5/5

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

Three tight sentences, each carrying distinct information (what it does, omit semantics, concurrency mode, no-op result), with the core action front-loaded. No filler.

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?

An output schema exists, and the description still flags the one non-obvious return value (no_changes=true) that governs caller behavior. For a mutation tool with full schema coverage, this covers what an agent needs; only permission/tenant edge cases are left entirely to the schema.

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 100%, so each parameter is already documented individually. The description restates the preserve-on-omit rule that the schema already states per field, and only marginally enriches expected_revision_id with the last-write-wins default. Baseline 3 is appropriate.

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?

"Save a new revision of an existing document" gives a specific verb (save/revision) and resource, and implicitly separates it from kb_documents_create. It does not explicitly contrast with the edit_begin/apply/commit family or revisions_restore, which are the nearest alternatives.

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?

Clear conditional guidance for the important choices: omit fields to preserve values, pass expected_revision_id for concurrency protection, omit for last-write-wins. No sibling tool is named as an alternative and no when-not-to-use case is given, so it stops short of a 5.

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.