Skip to main content
Glama

kb_write

Destructive

Write a document to your team's knowledge base; every AI in the team sees it. Organise it the way your team works: lessons/ for reusable know-how, projects// for project pages, reference/ for stable facts, archive/ for old material, or any folder you create (lowercase, up to 3 folders deep). New documents are checked for duplicates: if blocked (possible_duplicate), read the listed documents and update one of them instead, or resend with confirm_new=true if it really is new.

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": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "kb_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNocreate (new file), update (replace the whole file) or append (add to the end)create
pathYes<folder>/<name>.md or <folder>/<sub>/<name>.md, e.g. lessons/deploy/feedback_migrations.md
contentYesFull Markdown with YAML front matter (name, description)
messageNoCommit message
confirm_newNoSet true after checking it is not a duplicate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety bar is partly met. The description adds behavior the annotations cannot express: writes are team-wide visible, new documents pass through a duplicate gate, and a blocked write returns a possible_duplicate signal with a defined confirmation path. It does not spell out that update mode replaces the whole file, but the schema covers that.

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?

Two sentences, both front-loaded with the highest-value information: what the tool does and who sees it, then how to organize and how to recover from a duplicate block. No filler and no repetition of the field names.

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?

With 5 parameters, no output schema, and a destructive write, the description covers visibility, organization conventions, and the duplicate/confirmation loop—enough for correct invocation. It leaves the agent guessing about the success return shape, but with no output schema that is a minor omission rather than a blocker.

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, and the description exceeds it by adding path semantics (lowercase, max 3 folders deep, recommended folder taxonomy) and by explaining the operational trigger for confirm_new. Mode enum values are left entirely to the schema, which is acceptable given full coverage.

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?

Opens with a specific verb and resource ("Write a document to your team's knowledge base") plus the crucial audience scope ("every AI in the team sees it"), which cleanly separates it from read-side siblings like kb_read and kb_search. It stops short of naming the nearest write-side alternative (kb_retain), so the differentiation is strong but not exhaustive.

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 concrete routing advice via the folder taxonomy (lessons/, projects/<project>/, reference/, archive/) and prescribes the exact recovery path when a write is blocked: read the listed documents and update one, or resend with confirm_new=true. There is no explicit exclusion telling the agent when NOT to use this tool versus kb_retain or kb_move, which keeps it out of 5 territory.

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