Skip to main content
Glama
admin0330

KnowledgeBase MCP

by admin0330

kb_add_note

Saves text as a dated Markdown note in a chosen category, adds tags and source metadata, refreshes the search index, and returns an existing path when duplicate content is detected.

Instructions

Save text in one step: notes, pasted data, a summary, a web clip, a chat excerpt.

Writes <category>/<YYYY-MM-DD>_<title>.md with a small YAML header, makes it searchable immediately and refreshes INDEX.md. If a note with the same content already exists, nothing is written and its path is returned (duplicate: true) unless allow_duplicate is set.

:param title: Short title; also used for the file name. :param content: The body (Markdown or plain text). :param category: Target folder, e.g. "_Inbox", "03_Notes", "01_Documents/财务" (created if missing). :param tags: Optional tags, e.g. ["预算", "2026"]. :param source: Optional origin: a URL, "微信聊天", a book title ... :param date: Optional YYYY-MM-DD for the file name (default: today).

Input Schema

NameRequiredDescriptionDefault
dateNo
tagsNo
titleYes
sourceNo
contentYes
categoryNo_Inbox
allow_duplicateNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the write location and naming convention, the YAML header, immediate searchability, INDEX.md refresh, and the dedup short-circuit returning `duplicate: true`. The notable gap is filename collision with different content — the description never says whether an existing same-named file is overwritten, which is the key risk for a write tool.

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 the effect and the output path, then parameters in a scannable block. The `:param:` lines restate some of the opening sentence, but each adds an example or default, so little is truly wasted.

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?

For a seven-parameter mutation tool with no annotations, the description covers side effects, dedup semantics and parameter formats, and the output schema handles return values. The one thing an agent still cannot answer is what happens when the target filename already exists with different content.

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 description coverage is 0%, so the description must compensate, and it does: all seven parameters are addressed, including `allow_duplicate` in the prose. It adds format guidance absent from the schema — date as YYYY-MM-DD with today as default, category examples with a created-if-missing note, and tag/source examples in realistic (including non-English) forms.

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 and resource ('Save text') and immediately enumerates the concrete inputs it handles (notes, pasted data, web clips, chat excerpts). It also spells out the resulting artifact path pattern ``<category>/<YYYY-MM-DD>_<title>.md``, which separates it from file-oriented siblings like kb_import_file or kb_move_file.

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?

The enumerated scenarios make the intended use case clear, and the duplicate branch tells the agent what to expect on a repeat call. It stops short of explicit exclusions such as 'use kb_import_file for files already on disk', so the boundary with siblings is inferred rather than stated.

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