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 (folders lowercase, up to 3 folders deep; file names may use capitals, e.g. README.md). All folders are writable except repos/ (automatic repository maps) and rule files at the repository root (AGENTS.md, README.md, INDEX.md and similar), which are rejected with a 400 error (use_pr or generated) telling you how to fix it. The exception is TEAM.md: this space's own rules, which the space's AIs can edit with kb_write (create/update/append, no frontmatter needed); deleting or moving TEAM.md is still rejected. 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; TEAM.md (this space's own rules) is also writable
contentYesFull Markdown with YAML front matter (name, description; TEAM.md needs no front matter)
messageNoCommit message
confirm_newNoSet true after checking it is not a duplicate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / content / description
      Previous value: -"Full Markdown with YAML front matter (name, description)"New value: +"Full Markdown with YAML front matter (name, description; TEAM.md needs no front matter)"
    • changedInput schema / properties / path / description
      Previous value: -"<folder>/<name>.md or <folder>/<sub>/<name>.md, e.g. lessons/deploy/feedback_migrations.md"New value: +"<folder>/<name>.md or <folder>/<sub>/<name>.md, e.g. lessons/deploy/feedback_migrations.md; TEAM.md (this space's own rules) is also writable"
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations, which only say non-read-only, destructive, non-idempotent. The description discloses the duplicate-detection gate and its possible_duplicate blocking result, the exact 400 rejection codes (use_pr, generated) with remediation hints, the repos/ and repository-root rule-file exclusions, the TEAM.md special case, and folder depth/casing constraints. That is the kind of failure-mode detail an agent needs before attempting a write.

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?

Purpose is front-loaded and the sentences are dense with actionable detail rather than filler. It is a single long run-on paragraph, though; the folder conventions, exclusions, and duplicate flow would scan faster as short bullets.

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?

For a destructive, non-idempotent mutation with no output schema, the description covers the critical unknowns: where writes are allowed, what gets rejected and why, how duplicates are handled, and how the TEAM.md exception works. There is no output schema to explain, and all five parameters are documented in the 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 baseline would be 3, but the description adds real meaning: create vs update (whole-file replace) vs append, the frontmatter requirement and its TEAM.md exception, and specifically when confirm_new should be set. Path syntax is largely already in the schema, so the gain is moderate rather than complete.

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?

States a specific verb and resource ('Write a document to your team's knowledge base') plus the blast radius ('every AI in the team sees it'), so the operation and its visibility are unambiguous. It never names or contrasts with a sibling such as kb_file_put or kb_move, so an agent cannot tell from this text alone which write tool is the right one.

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 organizational guidance (lessons/, projects/<project>/, reference/, archive/, custom folders with depth and casing rules) and a clear branch for the duplicate case: read the listed documents and update one, or resend with confirm_new=true. It also carves out when TEAM.md is writable versus rejected. What's missing is routing against alternatives for the write path itself (e.g., when to use kb_move or kb_file_put instead).

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