Skip to main content
Glama

kb_write

Record what you learned during a coding session: save file notes, workflow flows, or absence lessons. The two-phase reuse gate matches existing concepts before writing, preventing duplicates.

Instructions

Save or correct a NOTEBOOK note after finishing real work here — you have the files in context, so no future agent is better placed to record what you learned. Write a file note (what a file is for), a flow note (how a task spans files), or an absence lesson (a confirmed "there is no X"). Also the tool to FIX or RETRACT a note you used that proved wrong (op: "put" replaces, op: "retract" removes).

TWO-PHASE reuse gate: a flow/lesson spec sent WITHOUT an id first searches the notebook for the same concept. If plausible matches exist, kb_write returns {status:"candidates", candidates:[...]} INSTEAD of writing — re-call with into: "<id>" to merge into an existing note, or is_new: true to declare a genuinely new one. This makes note identity reliable (matching, not guessing an exact title). File notes skip the gate (id derives from the path).

The spec shape is documented in coldstart.md — briefly: type ("file"|"flow"|"lesson", or sugar "file-hub"/"file-single"), title, summary, anchors ([{path, symbols?}] — the addresses the note is about, which drive freshness), plus type-specific fields (file: facets/character; flow: steps; lesson: kind:"absence"/scope/body). Call with NO arguments to get the full spec guide. This tool WRITES to the repo notebook; it never commits to git — publishing notes is a human-only step (coldstart kb commit).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
intoNoPhase-2 answer: merge this write into the existing note with this id (from a prior `candidates` response).
specNoThe note spec (JSON object). Fields: type, title, summary, anchors:[{path,symbols?}], and type-specific fields (facets/character for file; steps for flow; kind/scope/body for lesson). See coldstart.md. Omit `id` on a new flow/lesson to trigger the reuse gate.
is_newNoPhase-2 answer: declare this a genuinely new concept, bypassing the candidate matches from a prior `candidates` response.
sessionNoOptional session id (given in a capture prompt). Enables the flow-evidence check: a flow whose step files this session never actually read gets a warning.
Behavior5/5

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

No annotations provided, so the description fully handles transparency. It discloses the write behavior (never commits to git), the two-phase search-for-candidates mechanism, and the optional session-based flow evidence check. This is thorough and honest.

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?

Front-loaded with purpose, then logically structured into phases and spec details. However, it is somewhat verbose with nested explanations (e.g., detailed spec shape) that could be referenced externally.

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?

Given 4 parameters with nested objects and no output schema, the description is exceptionally complete. It covers the entire workflow, return values (candidates), edge cases, and even mentions how to get the full spec guide. No gaps identified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds significant context: explains how the 'spec' parameter triggers the reuse gate when 'id' is omitted, the roles of 'into' and 'is_new' in the second phase, and the purpose of 'session'. This goes well beyond the schema descriptions.

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?

Clearly states the tool is for saving or correcting notebook notes after real work, listing note types (file, flow, lesson) and fix/retract operations. Distinguishes itself from sibling tools (find, gs, kb_search, kb_lookup, kb_status) by focusing on writing, not reading.

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?

Explains when to use (after real work, with files in context) and describes the two-phase gate for avoiding duplicates. However, it does not explicitly state when to choose this tool over siblings, such as using kb_search for reading instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AkashGoenka/coldstart'

If you have feedback or need assistance with the MCP directory API, please join our Discord server