Skip to main content
Glama

kb_write

Write Markdown notes into the game knowledge base: creates a new file or overwrites an existing one, optionally grouped by game name. Use it to save tactics, monster habits, and match conclusions.

Instructions

把一段 Markdown 写进知识库(不存在则新建,已存在则整体覆盖)。

用途:保存新学到的战术、怪物习性、本局结论。 入参:filename 文件名(不要带路径);markdown_content 正文;game_name 可选,用于分类到子文件夹。 返回:成功为「已写入知识库: <路径> (N 字符)」;失败返回「错误: ...」。 注意:这是覆盖写。想追加请用 kb_append。 下一步:想追加而不是覆盖,用 kb_append;写完可用 kb_search 抽查内容。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
game_nameNo
markdown_contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden. It clearly discloses the destructive/overwrite behavior ('已存在则整体覆盖' and the explicit 注意: 这是覆盖写), which is the key behavioral trait for a write tool. It also documents return values (success and error formats). It does not mention permissions, atomicity, or size limits, so not a perfect 5.

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?

Well-structured with labeled sections (用途/入参/返回/注意/下一步), front-loaded with the core action. Every line earns its place and there is no redundant filler.

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 3-param write tool with no annotations and an output schema, the description covers purpose, parameters, overwrite semantics, return format, and sibling routing. Note that although an output schema exists, the description still describes return values, which is mildly redundant but harmless. Nearly complete aside from permission/path-safety details.

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 description coverage is 0%, so the description must compensate and largely does: it explains filename (no path), markdown_content (body), and game_name (optional, for subfolder categorization). This adds real semantic meaning beyond the bare schema property names. Minor gap: it doesn't specify accepted file extensions or path sanitization rules.

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+resource (写进知识库 / write Markdown into knowledge base) and clarifies the semantics of create-vs-overwrite in the first sentence. It distinguishes itself from siblings by explicitly noting it is an overwrite write, contrasted with kb_append for appending.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('保存新学到的战术、怪物习性、本局结论') and explicitly names the alternative for the append case ('想追加请用 kb_append'), plus a follow-up suggestion (kb_search) for spot-checking. Alternatives and conditions are spelled out.

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