Skip to main content
Glama

kb_documents_edit_commit

Idempotent

Commit an open edit session: flush its working buffer to a single new revision (title / project / groups preserved). Honors the begin-time revision snapshot — a concurrent edit returns kb.documents.stale_revision and leaves the session open to rebase or discard. Returns no_changes=true (no revision written) when the buffer equals the current document body.

Input Schema

NameRequiredDescriptionDefault
session_idYesOpen edit session id (required)
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; off keeps the response small - the returned current_revision_id confirms the landing).

Output Schema

NameRequiredDescriptionDefault
documentYes
no_changesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare idempotent, non-destructive, readOnly=false, and the description adds rich behavior beyond them: what is preserved (title/project/groups), the staleness contract (kb.documents.stale_revision, session kept open), and the no_changes short-circuit. This is exactly the mutation context an agent needs.

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?

Front-loaded with the action, then the success shape, then the two failure/edge behaviors. Dense but every clause carries decision-relevant information.

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

Completeness5/5

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

With an output schema present and 100% schema coverage, the description supplies the remaining operational contract — preservation semantics, stale-revision handling, no_changes — leaving no ambiguity about how to invoke or interpret the commit.

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 description coverage is 100%, so session_id, tenant_slug, and include_body are already documented in the schema. The description adds no parameter-level detail (e.g., how include_body interacts with the commit), which is fine given the schema baseline but not above it.

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+resource ('Commit an open edit session') and the concrete effect ('flush its working buffer to a single new revision'), which cleanly separates it from sibling session tools like kb_documents_edit_apply, _discard, and _rebase.

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?

Clearly establishes the context (after an edit session is open) and enumerates the branching outcomes that tell an agent how to proceed — stale revision leaves the session open to rebase or discard, and no_changes means no revision written. It stops short of explicitly naming sibling alternatives for the discard/rebase path, but the conditions are inferable.

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.