Library of Context
The Library of Context
AI 上下文的虚拟内存:在模型之外持久化,在模型之内受限。
AI 模型的原生上下文窗口是有限的。长时间的对话最终会不断膨胀,直到旧信息被截断或压缩。对于通过其上下文治理器路由的调用,Library 会将每个记录的事件存储在 SQLite 中,并根据受保护事件、近期事件和检索记录组装出有界的模型请求。
可以把模型的上下文窗口想象成一张阅读桌。图书馆能容纳的书比书桌多得多,但图书管理员只摆出当前任务所需的书。更换任务就是更换书桌,而不是往上面堆更多的书。
[!IMPORTANT] 本项目扩展的是可寻址上下文,而不是模型的物理上下文窗口限制。它面向本地原型和协作,而非生产级多租户内存服务。有关明确的支持边界,请参阅能力状态。
为什么这与普通压缩不同
传统的压缩会将不断增长的对话记录变成更小、有损的延续,并可能使原始细节游离在活动工作流之外。Library 使用可逆的语义分页:
traditional: growing transcript -> compacted transcript -> continue
Library: durable event log -> bounded recent/protected context
| + relevant retrieved books
+-----------> fresh model request on every turn原始事件是可检查和可恢复的。摘要可以成为导航辅助,但不必是唯一幸存的副本。
相关工作概览将此设计与模型长上下文方法、检索、提示压缩、提供商压缩、代理内存、检查点和推理运行时页面调度进行了比较。这里的"压缩"指的是一种更小、可能有损的延续表示,除非另一层保留其原始数据,否则这些原始数据无法独立寻址。
Related MCP server: local-memory-mcp
功能特性
具有
prepare -> model call -> commit生命周期操作的上下文治理器。持久的 SQLite 线程事件和事务性索引发件箱。
用于即时读取自身上下文的、以 token 为目标且有事件边界的近期环;过大的事件仅在模型信封中被截断,而不会影响磁盘上的数据。
有界的工作环,带有持久的 SQLite 发件箱,用于溢出和重启恢复。
针对指令、决策、活动计划和未解决状态提供受保护的上下文。
记录、嵌入和索引水位线,并带有队列健康状态。
用全新的、有界的提示信封取代对话记录的增长。
混合向量、SQLite FTS5、重要性和近期性检索。
字节限制的进程内存和可选的一次性本地 Redis 热层。
阅读桌交换报告:
swapped_in、swapped_out和retained。Python、本地 HTTP、CLI 和 STDIO MCP 集成接口。
无依赖的哈希嵌入和可选的本地 Ollama 适配器。
当您的代理或模型网关将每一轮对话都路由到治理器时,治理器会自动运行。仅 MCP 的集成是协作式的:主机可以使用归档和阅读桌工具,但无法重写已经调用工具的模型请求,也无法替换未记录的内部压缩钩子。
架构概览
flowchart LR
U[User or tool event] --> A[Durable SQLite append]
A --> E[(Thread event log)]
A --> O[(Transactional outbox)]
A --> R[Recent context ring]
O --> W[Bounded work ring]
W --> I[Embed and index workers]
I --> S[(SQLite library and FTS)]
I --> C[RAM and optional Redis cache]
R --> G[Context governor]
S --> G
P[Protected context] --> G
G --> D[Bounded reading desk]
D --> M[Native model context]
M --> X[Assistant response]
X --> A图书馆隐喻 | 实现 |
阅读桌 | 发送给模型的严格有界提示 |
书 | 包含文本、来源、元数据和嵌入的上下文记录 |
目录 | 混合词法和向量检索 |
附近的书架 | 进程内存和可选的本地 Redis |
书架 | 持久的 SQLite 后备存储 |
图书管理员 | 上下文治理器和检索策略 |
书车 | 有界的异步工作环 |
借阅台账 | 持久的线程事件日志和发件箱 |
快速开始
默认配置只需要 Python 3.11 或更高版本。Redis 是可选的。
在 Windows PowerShell 中:
git clone https://github.com/hwillGIT/library-of-context.git
cd library-of-context
py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
.\.venv\Scripts\python.exe -m library_of_context quickstart在 macOS 或 Linux 上:
git clone https://github.com/hwillGIT/library-of-context.git
cd library-of-context
python3 -m venv .venv
.venv/bin/python -m pip install -e .
.venv/bin/python -m library_of_context quickstart快速入门练习了保护、提示组装、事件记录、索引和清理,并使用临时数据库。它不使用 Redis、Docker、云服务或模型 API。继续阅读安装指南。
将其添加到您已运行的代理中
您的集成点 | 结果 |
支持 MCP 的现有代理 | 协作式归档、检索和阅读桌替换 |
拥有每次模型调用的 Python 或 HTTP 网关 | 通过 |
没有 MCP 且没有模型调用钩子的封闭主机 | 无透明集成 |
有关 Codex、Python 和 HTTP 配置示例,请参阅将 Library 添加到您的代理。配置 MCP 服务器后,请重启客户端或开始新会话;配置不会影响已在进行中的聊天。
运行自动治理的 Python 文本代理
from library_of_context import GovernedTextAgent, LibraryOfContext
def call_my_model(messages: list[dict[str, str]]) -> str:
return my_model_client.generate(messages=messages)
with LibraryOfContext("data/library.sqlite", redis_url="") as library:
with library.open_context_governor(
"agent-thread-42",
token_budget=12_000,
recent_token_budget=4_000,
protected_token_budget=2_000,
) as context:
context.protect(
"Production changes require a canary wave.",
label="deployment-policy",
)
agent = GovernedTextAgent(
context,
call_my_model,
system_prompt="Work carefully and cite retrieved project evidence.",
)
response = agent.turn(
"Diagnose the deployment failure.",
turn_id="request-0001",
)
context.flush(timeout=5)
print(context.status()["watermarks"])回调必须只发送提供的 messages;它不能附加另一个对话记录或继续提供程序管理的对话。内置适配器仅支持文本。结构化工具调用、流、附件和多模态内容需要自定义序列化适配器。
有关完整协议,请参阅上下文治理器。
MCP 集成
对于普通的 MCP 代理,请使用 integrations/README.md 中项目隔离的模板和可随时合并的代理指令。这是协作式内存;它不控制主机的原生对话记录。
可以使用以下命令检查原始本地 STDIO 服务器:
python -m library_of_context.mcp_server --no-redis拥有模型调用边界的自定义 MCP 网关可以使用:
工具 | 用途 |
| 记录用户轮次并构建有界的下一个请求 |
| 记录助手或工具结果 |
| 保持关键状态对每个提示都可用 |
| 将受保护状态恢复到正常分页 |
| 检查水位线、队列压力和工作线程健康状态 |
| 等待索引达到记录的水位线 |
Library 公开了归档、检索、阅读桌、无状态会话和治理器工具。仅在将返回的 messages 作为完整的下一个模型请求发送的主机中启用仅网关工具。
本地 HTTP API
python -m library_of_context --no-redis serve治理器端点为:
方法 | 路径 | 用途 |
|
| 持久追加加有界提示构建 |
|
| 持久助手/工具结果追加 |
|
| 添加受保护的上下文 |
|
| 释放受保护的上下文 |
|
| 等待异步索引可见性 |
|
| 检查治理器状态和水位线 |
/books、/library/ingest、/catalog/query 和 /desk/* 路由公开了更底层的库。服务器绑定到回环地址,并且没有身份验证。不要将其直接暴露给其他机器。
存储层次结构
近期环: 按线程排序的事件,受事件数量和估计 token 目标的限制。一个过大的事件可以驻留在内存中,以便新上下文可见;提示组装会将其模型可见视图截断到硬性信封预算内。这不是 LRU;对话顺序很重要。
进程内存: 用于热书和检索结果的字节限制 LRU。
本地 Redis: 用于热书、查询、书桌、TTL 和失效世代的可选共享缓存。
SQLite: 权威事件、发件箱、文本、元数据、FTS 和向量存储。
Redis 是一次性的。默认的本地 Redis 配置不是持久的消息代理,不应将其用作团队事件流。
在 Windows 上释放本地 Redis
不需要 Docker 和云账户。随附的 PowerShell 脚本会在 Ubuntu WSL 中安装 Redis 服务。它需要 WSL 2、Ubuntu 发行版和 systemd:
powershell -ExecutionPolicy Bypass -File .\scripts\install-local-redis.ps1
.\.venv\Scripts\python.exe -m library_of_context --db data/redis-check.sqlite doctordoctor 在检查存储层时打开配置的 SQLite 数据库。上面的示例创建了 data/redis-check.sqlite。
如果 SQLite 加进程内存就足够了,请在所有地方使用 --no-redis。
性能限制
提示组装是有界的,记录的事件使用事务性发件箱。FTS 返回有界的候选集,而向量检索对命名空间中的每个活动记录进行精确评分。因此,大型目录的规模声明需要经过测量的证据,并且当精确路径超过声明的限制时,需要一个有界的向量搜索适配器。
性能和扩展定义了测量、SLO 标准和基准问题。为什么这些改进?比较了更简单的替代方案、采用触发因素和证据门,而路线图则对条件性工作进行了排序。
文档
文档 | 用途 |
不变量、层级、一致性与演进 | |
与相邻上下文和记忆方法的原始来源对比 | |
准备/提交协议与故障行为 | |
已实现、实验性、计划中及不支持的范围 | |
教学式可视化讲解 | |
审计证据、非功能需求与基准门槛 | |
理由、反驳论点、替代方案与采纳驱动因素 | |
本地优先协作与推广设计 | |
里程碑与开放研究问题 | |
重大提案所需的“为什么/为什么不/证据”格式 | |
开发流程与贡献领域 | |
威胁模型与漏洞报告 |
参与设计
开放的设计问题包括:
哪些上下文应自动受到保护,谁可以释放它们?
如何衡量代理线程而非文档问答的检索质量?
对于 10 万到 100 万个块,合适的本地 ANN 适配器是什么?
分支应如何继承、合并和覆盖上下文?
哪些知识是安全且有价值的,可以从私有线程提升到团队目录?
共享事件平面应使用 Redis Streams、NATS JetStream 还是其他消息代理?
ACL 撤销应如何使本地缓存失效,而无需将云服务置于提示关键路径中?
对于不同模型的 tokenizer,哪种 token 压力策略能让用户获得可预测的体验?
更完整的列表见 ROADMAP.md。欢迎提出问题和基准测试结果、设计说明、适配器、故障测试以及批评意见。
贡献
请阅读 CONTRIBUTING.md,提出研究问题或设计提案,并保持拉取请求聚焦。本项目特别欢迎可复现的检索基准、ANN 适配器、tokenizer 集成、隐私审查、队列与崩溃测试,以及代理框架网关。
许可证
MIT © Library of Context 贡献者。
Available Tools
16 toolslibrary_consultARead-onlyIdempotent
Search the off-desk Library with hybrid vector, lexical, importance, and recency ranking without changing the reading desk.
| Name | Required | Description | Default |
|---|---|---|---|
| subject | Yes | ||
| max_books | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| catalog_filters | No | JSON catalog metadata or exact-match catalog filters. | |
| minimum_relevance | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false; the description extends this by adding 'without changing the reading desk' and revealing the hybrid ranking mechanism. It still omits return/pagination behavior, but with strong annotation coverage this is acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, front-loaded with the search action and resource, then compact behavioral details. Every phrase earns its place with no fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The core purpose and safety profile are clear, but with five parameters, a nested catalog_filters object, and no output schema, important operational details such as result format, ranking thresholds, and filter semantics are left to inference. The description is adequate for basic selection yet incomplete for confident invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only collection and catalog_filters have schema descriptions; subject, max_books, and minimum_relevance are undocumented. The description's ranking phrase only loosely hints at relevance but does not explain thresholds, limits, or query formats, so it fails to compensate for the 40% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with the specific action 'Search the off-desk Library' and names the ranking behavior (hybrid vector, lexical, importance, recency), making the tool's function unmistakable. The phrase 'without changing the reading desk' distinguishes it from desk/context siblings such as library_desk_get and library_context_*. This is a clear, specific purpose statement.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys a clear read-only search context and explicitly notes no desk state change, which helps select this tool over mutation-style siblings. However, it does not name alternatives or state when not to use it, so the guidance is contextual rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_context_commitB
Durably append the assistant or tool result after a governed model call. The outbox indexes it asynchronously while the recent ring makes it immediately visible.
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | assistant | |
| content | Yes | ||
| event_id | No | Optional caller idempotency key for this result. | |
| metadata | No | JSON catalog metadata or exact-match catalog filters. | |
| max_books | No | ||
| protected | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| importance | No | ||
| session_id | No | codex | |
| token_budget | No | ||
| recent_token_budget | No | ||
| protected_token_budget | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=false, destructiveHint=false, and idempotentHint=false. The description adds valuable behavioral context: 'Durably append' signals persistence, and 'outbox indexes it asynchronously while the recent ring makes it immediately visible' explains visibility and indexing behavior. This goes beyond annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences and front-loads the purpose. It efficiently conveys the core action and a key behavioral note without unnecessary detail. No redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (12 parameters, no output schema, low schema coverage), the description is incomplete. It does not indicate what the tool returns, how errors are reported, or the role of many parameters. While it mentions asynchronous indexing and immediate visibility, it lacks essential details for safe and correct usage, especially for a write operation with multiple tunable settings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 25% (3 out of 12 parameters have descriptions). The description does not explain any parameters beyond implying 'assistant or tool result' for the content/role. For a tool with 12 parameters, the description should compensate for the low schema coverage, but it does not clarify key parameters like max_books, protected, importance, token_budget, etc. This is a significant gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Durably append the assistant or tool result after a governed model call.' This specifies the verb (append), resource (assistant or tool result), and context (after a governed model call). While it is clear, it does not explicitly differentiate from sibling tools like library_context_prepare or library_context_protect, so it lacks a direct contrast.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing to commit results after a model call, but it does not provide explicit when-to-use vs. when-not-to-use guidance or name alternatives. The sibling tool names suggest other operations (e.g., prepare, protect, release), but no exclusions are given. The guidance is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_context_flushCIdempotent
Wait until this thread's durable outbox has been embedded and indexed through its recorded watermark.
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex | |
| timeout_seconds | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description explains the core behavior (waiting for embedding/indexing) and mentions the 'durable outbox' and 'watermark', which give some insight into side effects. However, it does not mention timeout behavior (despite a timeout_seconds parameter), potential failures, or what happens if the operation is interrupted. It is consistent with the idempotent annotation, but lack of detail on blocking semantics limits transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no redundant wording. It is well-structured and front-loaded with the primary action ('Wait until'), making it easy to parse. No other tools are referenced, keeping it focused.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is too terse for the apparent complexity. It does not define key terms like 'durable outbox' or 'recorded watermark', nor does it mention return values, errors, or timeout behavior (which is directly relevant given the timeout_seconds parameter). Given the existence of many sibling context operations, this level of detail is insufficient for an agent to know when and how to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no information about the three parameters. The schema already provides a description for 'collection' and obvious defaults for the others, but 'session_id' and especially 'timeout_seconds' lack explanation (e.g., what does timeout do? what is a session id?). With low schema coverage (33%), the description should compensate but does not, so parameter understanding is left incomplete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (wait until) and the resource (the thread's durable outbox) with a specific outcome (embedded and indexed through its recorded watermark). It distinguishes itself from siblings by indicating a blocking/waiting operation, though the exact meaning of 'flush' is not directly explained.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus the many sibling context operations (e.g., prepare, commit, release). It does not mention scenarios such as needing to ensure persistence or consistency, nor does it state the tool is appropriate after mutations. The usage context is entirely absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_context_prepareB
Durably append a user turn, then return the complete bounded semantic-paging envelope for the next model call. Send only the returned messages to the model.
| Name | Required | Description | Default |
|---|---|---|---|
| focus | No | ||
| event_id | No | Optional caller idempotency key for this turn. | |
| metadata | No | JSON catalog metadata or exact-match catalog filters. | |
| max_books | No | ||
| protected | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| importance | No | ||
| session_id | No | codex | |
| token_budget | No | ||
| user_message | Yes | ||
| system_prompt | No | ||
| strict_freshness | No | ||
| recent_token_budget | No | ||
| protected_token_budget | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Given annotations only state readOnlyHint:false, openWorldHint:false, idempotentHint:false, and destructiveHint:false, the description adds meaningful behavioral context: operations are durable ('Durably append'), outputs are bounded via a paging envelope, and the model should replace its message set with the returned value. It does not contradict the annotations (a write is consistent with readOnlyHint:false) and adds beyond what annotations provide, though it omits details on the envelope's structure or edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two terse sentences with zero filler. The first declares the primary action and return value; the second provides a critical usage warning. Both sentences earn their place and critical information is front-loaded. Ideal concision.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 14 parameters, no output schema, and low schema coverage, the description is far too thin. It explains none of the parameters (token budgets, focus, max_books, etc.) and the 'semantic-paging envelope' behavior is never structurally defined. The brief note about the envelope is helpful context, but it does not adequately enable an agent to select this tool over siblings or safely set advanced options.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 21% (3 of 14 params), and the description provides no parameter-level explanation whatsoever—so 11/14 params (focus, max_books, token_budget, importance, etc.) are undocumented in both the schema and the description. The description does not compensate for this significant gap. It earns a 2 because the bare names and types are present, but the intent/format of most parameters is left to guesswork.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description names a specific verb+resource ('durably append a user turn', 'return... semantic-paging envelope'), and the second sentence clarifies an important behavioral consequence ('Send only the returned messages to the model'). It's clear this is a write-then-return-context operation, but heavy jargon like 'bounded semantic-paging envelope' and lack of explicit sibling differentiation keep it from a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for the next model call' and the instruction 'Send only the returned messages to the model' imply this is the standard context-preparation entry point and convey a constraint on how to consume results. However, no explicit when-to-use guidance, exclusions, or named alternatives are given (e.g., when to use library_prompt_build or library_context_commit instead). With 15 siblings, explicit differentiation would materially help.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_context_protectA
Persist critical instructions, decisions, active plans, or unresolved state as protected context that remains eligible for every governed prompt until released.
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | developer | |
| label | No | ||
| content | Yes | ||
| event_id | No | ||
| max_books | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| importance | No | ||
| session_id | No | codex | |
| token_budget | No | ||
| recent_token_budget | No | ||
| protected_token_budget | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no readOnlyHint, the tool is indeed a write/persist operation, consistent with descriptions of others like library_shelve. The description adds context beyond annotations: 'remains eligible for every governed prompt until released' reveals persistence duration. It also mentions 'protected' and 'critical', which implies weight. However, it does not detail failure modes, idempotency, or implications of multiple books, but this is reasonably rich for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, concise, front-loaded with the action ('Persist') and resource ('critical instructions, decisions, active plans, or unresolved state'). No fluff, yet packs essential notion of persistence across prompts. Ideal conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having many parameters (11), the description suffices given the complexity: it fully explains the purpose and lifecycle (persistent until release). Output schema absent, but the return is unspecified; the description doesn't need to explain output. The tool's function is clearly mapped to its name and purpose. High completeness given the abstract context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 9%, meaning the description adds meaning beyond schema. The description implies the purpose of 'content' (critical instructions, decisions) but does not elaborate on parameters like 'importance', 'token_budget', 'role', or 'label'. It does explain the concept of 'protected context' that is preserved for every prompt. Given low coverage (9%), the description sets the conceptual framing but leaves parameter-specific details to the schema names. This is a moderate compensatory effort.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool persists critical items (instructions, decisions, plans, unresolved state) as protected context. The verb 'Persist' plus specific resources (instructions, decisions, plans) distinguishes it from siblings like library_shelve or library_context_commit, and the phrase 'remains eligible for every governed prompt until released' clarifies the lifecycle.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: persist critical context that must survive across prompts. It does not explicitly name alternative tools, but the context signals include sibling tools like library_context_release (opposite action) and library_context_prepare/commit (different actions). The term 'until released' alludes to the release tool, and 'protected context' differentiates from unprotected context. However, it lacks explicit 'use this when...' or 'don't use for...' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_context_releaseAIdempotent
Release one protected event so it can be paged normally. The durable event is retained.
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | Yes | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds behavioral context beyond the annotations: it states the durable event is retained and that the event becomes paged normally. This complements the idempotentHint and destructiveHint:false annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences that front-load the action and its outcome. Every part earns its place; no filler or repetition of schema details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and the core behavior is clear, but there is no output schema and no return value or error behavior described. Given the sparse annotations and sibling context, the description is adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 33%, with event_id and session_id undocumented. The description mentions 'one protected event' but does not explain parameter meanings or formats, so it does not compensate for the low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Release') and resource ('one protected event') with the effect ('so it can be paged normally'). It clearly distinguishes from siblings like context_protect and context_flush by clarifying the protected/durable nature.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended scenario is implied: release a previously protected event when normal paging is desired. However, there is no explicit when-to-use guidance, alternative naming, or exclusion wording compared with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_context_statusBRead-onlyIdempotent
Read context-governor watermarks, queue occupancy, prompt pressure, and worker health for one agent thread.
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description's mention of 'Read' aligns without contradiction. However, it adds no additional behavioral details (e.g., error conditions, rate limits, or side effects) beyond what the annotations already convey.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no redundancy or extraneous information. It efficiently communicates the core functionality without verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-status tool, the description conveys the essential action and scope. However, it omits any mention of output format, typical use cases, or prerequisites (e.g., must have an active session), leaving some gaps in completeness for a fully self-contained definition.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not explain the parameters at all. While 'collection' has a schema description, 'session_id' lacks one, and the tool description fails to clarify how these parameters relate to 'one agent thread.' The low schema coverage (50%) is not compensated, leaving the meaning of 'session_id' ambiguous.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's verb ('Read') and enumerates the specific resources it accesses (context-governor watermarks, queue occupancy, prompt pressure, worker health) along with the scope ('for one agent thread'), making its purpose unambiguous and distinct from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives, such as when a status check is preferred over a stop or shelve operation. It lacks contextual cues like 'use this when you need to monitor progress' or 'for real-time metrics.'
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_desk_getARead-onlyIdempotent
Read the latest bounded reading desk snapshot for a session.
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description does not need to restate safety. It adds value by specifying the resource type ('bounded reading desk snapshot') and scope, which helps set expectations for what the tool returns. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundancy. Every word contributes to the meaning, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with rich annotations and only two optional parameters, the description is sufficiently complete. It lacks details about the snapshot's structure or handling of missing sessions, but given the tool's simplicity and the absence of an output schema, it does not require more. The description is adequate for its scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50%: collection has a description but session_id lacks one, and the tool description does not elaborate on either parameter. The sentence 'for a session' hints at session_id's role but does not clarify its format or default behavior. The description adds no parameter meaning beyond the schema, leaving a gap for session_id.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Read'), the resource ('latest bounded reading desk snapshot'), and the scope ('for a session'). It distinguishes itself from siblings like library_desk_refresh (which likely refreshes) and library_desk_watch (which likely watches), establishing a unique purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when you need to read a snapshot, but it does not explicitly contrast with alternatives or provide when-not-to-use guidance. Sibling names like refresh and watch hint at alternatives, but the description itself offers no direct comparison or selection criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_desk_refreshARead-onlyIdempotent
Replace a session's bounded reading desk with books relevant to the current subject. Returns the prompt-ready context plus swapped-in, swapped-out, and retained IDs.
| Name | Required | Description | Default |
|---|---|---|---|
| subject | Yes | ||
| keep_open | No | Book IDs that must be considered first for the desk. | |
| max_books | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex | |
| token_budget | No | ||
| catalog_filters | No | JSON catalog metadata or exact-match catalog filters. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description's 'Replace' might imply modification, but it's a read-only refresh (no destruction). The description adds that it returns prompt-ready context and IDs, which is extra behavioral info. No contradiction. It could clarify it doesn't modify the session state permanently, but the readOnly hint covers that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One clear sentence, front-loaded with action and details. No fluff, no redundancy. Perfectly sized for the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has 7 params, no output schema, and moderate schema coverage. Description gives high-level outcome but lacks details on how parameters interact (e.g., how keep_open affects selection, how token_budget is enforced). With complex params like catalog_filters as nested object, more detail could help. But the description is adequate for basic usage; a score of 3 reflects it's usable but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 43% (3 out of 7 params have descriptions: keep_open, collection, catalog_filters). The description mentions 'subject' but doesn't describe its syntax beyond schema. It doesn't explain max_books, session_id, token_budget beyond what schema provides. Baseline 3 is appropriate because schema covers some params, and description adds concept of 'prompt-ready context' but no detailed param guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the action: 'Replace a session's bounded reading desk with books relevant to the current subject.' It distinguishes from siblings by focusing on the 'desk refresh' operation and mentions the specific outcome (swapped-in, swapped-out, retained IDs).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states when to use this tool (when refreshing the desk based on subject) and what it returns. It doesn't explicitly say when not to use it or name alternatives, but the specific context (session, subject, desk) makes usage clear. It could have mentioned using library_desk_get to inspect before refresh, but not mandatory.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_desk_stopAIdempotent
Stop periodic refresh for a reading-desk session. The current snapshot remains available.
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide idempotentHint=true and destructiveHint=false. The description adds the valuable detail that 'the current snapshot remains available,' reassuring the agent that stopping the refresh does not discard data. It also clarifies the operation is non-destructive. This goes beyond what annotations alone convey and aligns with them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with the primary action, and a useful clarifying sentence about the snapshot. Every word serves a purpose; no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple idempotent stop operation, the description is sufficient: it explains the outcome and clarifies that the snapshot remains. It does not describe return values, but no output schema exists and the operation has no side effects that need disclosure. The use of 'session' aligns with the session_id parameter, so the missing parameter documentation is contextually supplied. Could mention behavior when called again, but idempotentHint already covers that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is only 50% because session_id lacks a description. The tool description does not mention or explain either parameter. 'Collection' and 'session_id' are left to be inferred by their names and defaults. The description adds no meaning beyond the schema, and for the under-documented session_id, it provides zero elaboration.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb+resource: 'Stop periodic refresh for a reading-desk session.' This clearly indicates the action and target. It also distinguishes from sibling tools like library_desk_refresh and library_desk_watch by stating it stops the periodic refresh, not starts or retrieves.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: it is meant for stopping a periodic refresh that presumably was started by library_desk_watch or similar. It does not explicitly state when to avoid using it or mention alternatives, nor does it note that the session may continue to exist for other operations. Thus, it provides some implied context but not thorough guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_desk_watchBIdempotent
Refresh a reading desk immediately and periodically thereafter for a long-running task. A later focus change should call library_desk_refresh or start this tool again.
| Name | Required | Description | Default |
|---|---|---|---|
| subject | Yes | ||
| keep_open | No | ||
| max_books | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex | |
| token_budget | No | ||
| catalog_filters | No | JSON catalog metadata or exact-match catalog filters. | |
| interval_seconds | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already indicate idempotentHint true and destructiveHint false, but the description does not disclose important behavioral details like whether the periodic refresh runs in the background, how to stop it (library_desk_stop sibling exists), or what side effects might occur. The 'long-running task' language implies ongoing behavior, but the lifecycle and eventual stop behavior are left unspecified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: two short sentences, no fluff, and each sentence carries practical information. The first sentence declares the core action and context, the second gives follow-up guidance. It is well front-loaded and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description conveys the primary purpose and provides a pointer to library_desk_refresh, but given the tool's 8 parameters and no output schema, more lifecycle and invocation context would be needed for an agent to use it fully. It omits mention of stopping the watch, return behavior, and the role of key parameters like subject, keep_open, and token_budget. Still, for a starting-a-refresh action it is not severely incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 8 parameters and only 25% description coverage. The tool description adds minimal parameter-related meaning: 'immediately and periodically' relates semantically to interval_seconds, but subject, keep_open, max_books, session_id, token_budget, and catalog_filters are not explained in the description. Since the schema lacks descriptions for most parameters, this is a significant gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb+resource: 'Refresh a reading desk immediately and periodically thereafter', which clearly identifies the tool's action and differentiates it from the one-shot library_desk_refresh. It also places it in the context of 'a long-running task', adding scope that helps distinguish it from related library tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear guidance on when to use this tool: it is for long-running tasks that need immediate and periodic refreshing. It also explicitly states that after a focus change, one should call library_desk_refresh or restart this tool, providing an actionable alternative. It lacks an explicit 'when not to use', but the provided context is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_message_recordB
Shelve one conversation message for a virtual-context session. External model gateways should record assistant replies after each response.
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | ||
| content | Yes | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| importance | No | ||
| session_id | No | codex |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are minimal (all false), so description carries the burden. The description says 'Shelve one conversation message' which implies a write operation (consistent with readOnlyHint=false). It adds context about external model gateways and recording replies, but doesn't disclose details like whether this replaces existing messages, if there are size limits, or if it handles different roles (though role is in schema). No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loaded with the core action. No wasted words, but it's slightly terse given the tool's complexity and the need to clarify parameter semantics.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, only 2 required, and no output schema, the description is thin. It doesn't explain what happens after shelving (return value?), how roles are handled, or the significance of 'importance'. The tool's purpose is clear, but the description lacks completeness for an agent to use it effectively without digging into schema defaults.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is low (20%) - only 'collection' has a description. The tool description doesn't elaborate on any parameters besides saying 'one conversation message'. It fails to explain the meaning of 'importance', 'session_id', or the role/content relationship. The description adds minimal value beyond the schema, leaving the agent to infer semantics from the enum and defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: to shelve one conversation message for a virtual-context session. It identifies the resource (conversation message) and the action (shelve/record). It distinguishes from siblings by mentioning 'virtual-context session' and specifying 'assistant replies', though it doesn't explicitly differentiate from library_shelve or library_shelve_document.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a clear usage context: 'External model gateways should record assistant replies after each response.' This specifies when to use (after each response) and for what (assistant replies). It doesn't explicitly exclude other tools or mention alternatives, but the context is clear enough for an agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_prompt_buildC
Build a complete stateless model-input envelope from bounded recent turns plus a replacement reading desk. Full history remains shelved on disk instead of growing the live prompt.
| Name | Required | Description | Default |
|---|---|---|---|
| max_books | No | ||
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| session_id | No | codex | |
| record_user | No | ||
| token_budget | No | ||
| user_message | No | ||
| system_prompt | No | ||
| recent_token_budget | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds some behavioral context by noting the operation is 'stateless' and that 'full history remains shelved on disk', implying it does not grow the live prompt or modify persistent state. However, it does not disclose permissions, side effects, or failure modes, and the annotations provide no hint (readOnlyHint is false), so the description only partially clarifies the behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences and mostly front-loaded, but the metaphor 'reading desk' and 'shelved' may obscure meaning without prior library context. It is concise yet could be clearer for the agent, warranting a middle score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With a complex tool of 8 parameters, 13% schema coverage, no output schema, and no annotations, the description is insufficient. It does not explain the return format, parameter usage, or any side effects. A tool this complex requires richer description to be usable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 13%, leaving seven of eight parameters undescribed. The tool description does not mention any parameter names or meanings, making it impossible for the agent to understand inputs like 'max_books', 'token_budget', or 'system_prompt'. The description entirely fails to compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'builds a complete stateless model-input envelope' from bounded recent turns and a replacement reading desk, conveying the core function. However, it does not explicitly differentiate it from similar library tools like library_context_prepare or library_desk_get, leaving its unique role somewhat ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of scenarios, prerequisites, or exclusions. The description only states what it does, not when it should be invoked, leaving the agent without usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_shelveA
Persist one concise book of context to the local Library. Use for durable decisions, constraints, findings, and user-approved memories—not transient chatter or secrets.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| source | No | mcp | |
| book_id | No | ||
| catalog | No | JSON catalog metadata or exact-match catalog filters. | |
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| importance | No | ||
| shelf_life_seconds | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already convey read/write and non-destructive naturechers (readOnlyHint=false, destructiveHint=false). The description adds the 'durable' framing but does not disclose potential side effects like overwriting an existing book_id or limitations on size. It does not contradict annotations, but also goes beyond them minimally.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loads the purpose, and is free of fluff. Every sentence contributes to understanding the tool's role and scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a write-oriented tool with no output schema and several optional parameters, the description gives enough to understand the top-level function but leaves parameter semantics to the schema. It is a minimum-viable description, but given the tool's complexity and low schema coverage, it falls short of fully informing usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is low (29%), and this description adds no parameter-specific meaning. It only hints at content type ('concise book') but does not explain text, source, book_id, importance, or shelf_life_seconds. Since coverage is low, the description should compensate, but it does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb-resource pair ('Persist ... to the local Library') and clearly defines the domain (durable context, not chatter). It distinguishes itself from siblings like library_desk_stop and library_consult by focusing on persisting a book of context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit positive guidance ('Use for durable decisions, constraints, findings, and user-approved memories') and negative guidance ('not transient chatter or secrets'), which helps an agent decide when to invoke it. However, it does not mention alternatives or exclusions relative to sibling tools (e.g., library_shelve_document).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_shelve_documentADestructiveIdempotent
Chunk and persist a larger local text document as multiple books. Set replace_edition to replace prior chunks from the same source.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| source | Yes | ||
| catalog | No | JSON catalog metadata or exact-match catalog filters. | |
| collection | No | Optional library collection/namespace; defaults to the configured collection. | |
| importance | No | ||
| chapter_tokens | No | ||
| overlap_tokens | No | ||
| replace_edition | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare destructive and idempotent behavior. The description adds valuable context by explaining the chunking behavior and that replace_edition replaces prior chunks from the same source, which clarifies the destructive semantics beyond the annotation flags.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences front-load the core purpose and add the single most important behavioral caveat. There is no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The core chunk-and-persist flow and replacement behavior are covered, and annotations provide the safety profile. However, with 8 parameters, 25% schema description coverage, and no output schema, the description leaves important operational details—like how importance, chapter_tokens, and overlap_tokens affect output—to inference.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 25%, and the description only elaborates on replace_edition. Parameters like chapter_tokens, overlap_tokens, importance, and catalog semantics remain under-specified; their names give hints, but the description does not compensate for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Chunk and persist') and the resource ('a larger local text document'), with a distinctive outcome ('as multiple books'). This distinguishes it from sibling tools like library_shelve, which likely handles a single unsplit document.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: use this for larger local text documents that need chunking, and use replace_edition to update previously persisted chunks. It does not explicitly name alternatives or give when-not-to-use guidance, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
library_statsARead-onlyIdempotent
Inspect Library tier health, usage, cache hit/miss counters, and embedding configuration.
| Name | Required | Description | Default |
|---|---|---|---|
| collection | No | Optional library collection/namespace; defaults to the configured collection. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is well-covered. The description adds context about what is inspected (health, usage, cache counters, embedding config), which is useful, but it does not disclose details like whether the operation may be slow or trigger background refresh, which could be relevant for a stats tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the key verb 'Inspect' and lists the key data categories. Every word earns its place, with no fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (only one optional parameter, no output schema), the description is sufficiently complete: it names the key inspection areas. The lack of an output schema means the agent might not know the return format, but that is not required when no output schema is provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides 100% coverage for the single parameter 'collection', describing it as an optional namespace. The description does not add any additional meaning beyond what the schema provides; thus the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool inspects library tier health, usage, cache hit/miss counters, and embedding configuration, which is specific enough to distinguish it from siblings like library_shelve and library_consult. It doesn't explicitly mention the optional 'collection' parameter in the description, but the purpose is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies a read-only inspection tool, but does not provide explicit guidance on when to use this tool versus alternatives like library_desk_get or library_desk_status. There is no explicit mention of when not to use it or which sibling tools to prefer for other tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
16 tool updates
v0.3.0- First observed
library_consult - First observed
library_context_commit - First observed
library_context_flush - First observed
library_context_prepare - First observed
library_context_protect - First observed
library_context_release - First observed
library_context_status - First observed
library_desk_get - First observed
library_desk_refresh - First observed
library_desk_stop - First observed
library_desk_watch - First observed
library_message_record - First observed
library_prompt_build - First observed
library_shelve - First observed
library_shelve_document - First observed
library_stats
TDQS
Scored across 16 tools
The tools split into understandable areas (shelving, reading desk, context governor), but several pairs overlap in behavior: desk_refresh/desk_watch, context_prepare/prompt_build, and message_record/context_commit can all be confused without close reading. Descriptions mostly disambiguate them, but the boundaries are not immediately obvious from names alone.
The library_ prefix plus domain area gives a predictable feel, especially for the desk_* and context_* families. A few standalone verbs/nouns like library_shelve, library_consult, and library_stats break the noun_verb pattern, but these are minor deviations.
At 16 tools, the surface is slightly heavy and crosses the usual well-scoped range, though the three subsystems (library, desk, and context governor) explain most entries. A couple of prompt/recording tools could likely be consolidated without losing core functionality.
The context lifecycle is well covered: shelve/consult, desk refresh/get/watch/stop, and prepare/commit/protect/release/status/flush form coherent workflows. Missing direct book-level listing/removal or get-by-ID is a minor gap, but it does not create a dead end for the main use cases.
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
Cross-tool persistent memory and context for AI assistants over MCP.
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
An MCP memory server. One memory your agents share — across models, devices and apps.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceAn MCP server that extends AI agents' context window by providing tools to store, retrieve, and search memories, allowing agents to maintain history and context across long interactions.MIT
- FlicenseNot gradedqualityDmaintenanceA local MCP server that provides semantic memory storage and retrieval for coding and AI agents, enabling durable context across chat sessions.32 npm4-
- AlicenseBqualityDmaintenanceMCP server providing context usage estimation, conversation compaction, and durable semantic memory via local embeddings and SQLite.1712 npm3MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides persistent long-term memory for AI agents via local SQLite storage with low token overhead, enabling memory storage, retrieval, and management across sessions.1MIT