Skip to main content
Glama
Kilonova MCP
by MilnaOS

kb_write

Write or update entity records in a knowledge base to persist decisions, task state, and patterns mid-session, merging with existing data to maintain project context across sessions.

Instructions

Write or update an entity record in a KB. Use this mid-session to persist decisions, task state, patterns, or any structured note. Merges with existing record — only non-empty fields overwrite.

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": {
      "topic": "<topic>",
      "entity_type": "<entity_type>",
      "name": "<name>",
      "data": "<data>"
    },
    "name": "kb_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesRecord fields as a JSON object
nameYesRecord name — used as filename
topicYesKB topic (e.g. "claude_context")
entity_typeYesEntity type (e.g. "decision", "active_task")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden, and it does disclose the key non-obvious behavior: "Merges with existing record — only non-empty fields overwrite." However, it omits whether writes are destructive/irreversible, what happens on name collisions (the schema notes name is used as filename), and what the call returns or how it signals failure.

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 tightly packed sentences: the action comes first, then the when-to-use, then the merge caveat. No filler, and the most important scoping fact (merge semantics) is stated before the agent commits.

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

Completeness3/5

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

For a four-required-param mutation tool with a nested free-form `data` object and no output schema, the description covers purpose, timing, and merge behavior but leaves the record payload shape unexplained (the sibling kb_schema presumably covers this but is never referenced). It is adequate but not fully self-sufficient.

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 all four parameters are already documented in the schema, making 3 the baseline. The description adds only indirect meaning through the merge rule (relevant to how `data` fields apply), with no further detail on `topic`, `entity_type`, or the free-form `data` shape.

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?

The description opens with a specific verb+resource pair ("Write or update an entity record in a KB") and clarifies that it is an upsert rather than a pure create. It does not explicitly differentiate itself from siblings like kb_search or kb_load, but the write/merge framing makes the role reasonably distinct.

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?

"Use this mid-session to persist decisions, task state, patterns, or any structured note" gives a clear usage context and even sample content types. It stops short of naming when-not-to-use or pointing to alternatives such as kb_search for reads or kb_load for retrieval.

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