Skip to main content
Glama

novel_lexicon

Register scene-specific must-use terms so AI writes with your words instead of generic phrasing, then audit chapters for coverage and substitute-word hits.

Instructions

必用词表:登记「某场景必须使用的专有名词 / 作者习惯用词」,让 AI 优先用表内词写作,而不是退回自己惯用的通用说法。两层存储(书级同名覆盖全局):全局层 _global 放跨书惯用词,书级层放本书专名。action:list=查看(默认合并两层)/ add=批量登记(terms 数组或 text 文本,一次可几百条)/ update=改单条(含改名 newTerm、单条停用)/ delete=删除(terms 指定,或 all=true 清空某层)/ import=文本批量导入(text=每行一条:词 或 词|类型|场景|替身1,替身2|备注,可用 replace=true 整层覆盖)/ scan=从本书正文提取候选词供挑选 / audit=成稿用词审计(必用词覆盖率 + 通用替身词命中的行号与原句,只读)/ export=导出词条 JSON / toggle=开/关某一层。字段:term 词条、kind 类型(专名/偏好词/称呼/场景词/口头禅/其他)、scene 适用场景(本章大纲方向行含该词时优先注入)、avoid 通用替身词(正文里出现它即等于没用必用词,审计据此定位)、aliases 等价写法(算命中)、note 用法说明、priority=high 高优先。**开关「必用词优先」(lexiconFirst)默认开启;开启且词表非空时,开写包会把它作为硬清单注入。**写完一章用 action=audit 复核。职责边界(v6.4.0):audit 只审「必用词表」(覆盖率与通用替身词),与世界观禁用词(novel_settings category=worldview 的 bannedWords / speechStyle)毫无关系——看到「覆盖率 100%」不代表没有禁词命中;查禁用词请用 novel_continuity_check(不带 chapter 参数审全书,带 chapter 只审该章)。

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": {
      "action": "<action>"
    },
    "name": "novel_lexicon"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNodelete 用:清空该层全部词条(须显式传 true)。
bookNo书名(scope=global 时可省略)。
kindNo类型(专名/偏好词/称呼/场景词/口头禅/其他,也可自定义)。
noteNo用法/搭配说明。
rootNo章节库根目录。
termNoupdate/delete 用:目标词条。
textNoimport/add 用:批量文本,每行一条(`#` 开头为注释)。
avoidNo通用替身词:正文出现即等于没用必用词(审计据此报行号)。
forceNo写操作(add/import/update/delete/toggle)用:目标层文件损坏时确认丢弃其内容并覆盖。默认 false——损坏层一律拒写以免静默清空原条目(也可在用 overwrite=true 时等价确认)。
limitNolist/scan 用:返回条数上限(默认 list 200 / scan 60)。
queryNolist 用:按词条/备注/场景子串过滤。
sceneNo适用场景标签;本章大纲方向行含该词时该条优先注入。
scopeNo作用层:book=本书(写操作默认)/ global=全局层 / all=两层合并(list 默认;update 时先书级后全局)。
termsNoadd/delete 用:词条数组(可一次几百条;add 时每项也可写成 `词|类型|场景|替身|备注`)。
actionYes要执行的操作。
offsetNolist 用:起始偏移(默认 0)。
aliasesNo等价写法(审计同样算命中)。
chapterNoaudit 用:章号 / 文件名 / 标题子串,或 all=全书;省略=审计最后一章。
enabledNotoggle 用:整层开关;update 用:单条启停。
newTermNoupdate 用:把词条改成新名字(原名不存在时不动)。
replaceNoimport 用:true=整层替换(默认 false=合并追加)。
priorityNohigh=高优先(注入与审计排序靠前)。
overwriteNoadd/import 用:同名词条是否覆盖(默认 true)。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.3.0

TDQS

A4.5/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 behavioral burden and largely succeeds: it discloses two-layer storage with book-level override, the default-on injection into the writing pack, audit's read-only nature, and the destructive implications of replace/all plus the corrupt-layer guard. It doesn't cover every edge case (e.g., failure when renaming a non-existent term), but the mutation profile is well disclosed.

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-loads the purpose and then a compact action-by-action enumeration, so a 23-parameter tool is made navigable in a few dense sentences. It is long and heavy on bold emphasis, but nearly every clause carries actionable info rather than 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 23-parameter, no-annotation, no-output-schema tool, the description covers purpose, action semantics, storage layers, injection behavior, and sibling boundaries well enough to call it correctly. Remaining gaps are peripheral (return shapes for export/scan, exact edit failure modes) rather than blocking.

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 100%, so the baseline is 3, but the description adds genuine value beyond the schema by mapping each action to its parameters (which fields apply to list vs add vs update vs import), plus text-line format hints and default semantics. This action-to-parameter mapping is meaning the schema alone doesn't convey.

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: registers scene-mandatory proper nouns / author habitual words so the AI prefers in-list terms, with a two-layer (global/book) storage model. It enumerates every action (list/add/update/delete/import/scan/audit/export/toggle) so the agent can tell what the tool does without opening the schema. It also differentiates itself from siblings by name.

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 guidance ('after writing a chapter, recheck with action=audit') and an explicit boundary: the audit only covers the mandatory-word list and is unrelated to worldview bannedWords, directing the agent to novel_continuity_check for banned words. It also states the default behavior (lexiconFirst on, injected as a hard list when the list is non-empty), leaving little to inference.

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