Skip to main content
Glama
hwillGIT
by hwillGIT

The Library of Context

CI Python 3.11+ License: MIT Local first

AI 컨텍스트를 위한 가상 메모리: 모델 외부에서는 영속적이고, 모델 내부에서는 제한적입니다.

The Library of Context virtual-memory architecture

AI 모델은 유한한 네이티브 컨텍스트 창을 가집니다. 긴 대화는 결국 확장되어 오래된 정보가 잘리거나 압축됩니다. 컨텍스트 거버너를 통해 라우팅되는 호출의 경우, Library는 각 기록된 이벤트를 SQLite에 저장하고 보호된 이벤트, 최근 이벤트, 검색된 레코드에서 제한된 모델 요청을 조립합니다.

모델의 컨텍스트 창을 독서대로 생각해 보세요. Library는 책상보다 훨씬 많은 책을 보관할 수 있지만, 사서는 현재 작업에 필요한 책만 책상에 펼쳐 놓습니다. 작업이 바뀌면 책상 위의 책도 교체됩니다. 책이 더 쌓이지는 않습니다.

[!IMPORTANT] 이 프로젝트는 모델의 물리적 컨텍스트 창 한도를 확장하는 것이 아니라 주소 지정 가능한 컨텍스트를 확장합니다. 프로덕션용 멀티 테넌트 메모리 서비스가 아닌 로컬 프로토타입과 협업을 위한 것입니다. 명시적인 지원 범위는 Capability Status를 참조하세요.

일반적인 압축과 다른 점

기존 압축은 커지는 대화 기록을 더 작고 손실 있는 연속체로 바꾸며, 원본 세부 정보가 활성 워크플로우 밖에 남을 수 있습니다. 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-work landscape는 이 설계를 모델 장기 컨텍스트 방법, 검색, 프롬프트 압축, 제공자 압축, 에이전트 메모리, 체크포인팅, 추론 런타임 페이징과 비교합니다. 여기서 "압축"은 원본이 다른 계층에서 보존되지 않는 한 독립적으로 주소 지정할 수 없는, 더 작고 잠재적으로 손실 있는 연속 표현을 의미합니다.

Related MCP server: local-memory-mcp

기능

  • 컨텍스트 거버너: prepare -> model call -> commit 수명 주기 작업.

  • 영속적인 SQLite 스레드 이벤트와 트랜잭션 인덱싱 아웃박스.

  • 즉각적인 자체 컨텍스트 읽기 동작을 위한 토큰 목표 기반, 이벤트 수 제한 최근 링; 과대 이벤트는 디스크가 아닌 모델 엔벨로프에서만 잘립니다.

  • 오버플로 및 재시작 복구를 위한 영속적인 SQLite 아웃박스를 갖춘 제한된 작업 링.

  • 지침, 결정, 활성 계획, 미해결 상태를 위한 보호된 컨텍스트.

  • 큐 상태를 포함한 기록, 임베딩, 인덱싱된 워터마크.

  • 대화 기록 증가를 대체하는 신선하고 제한된 프롬프트 엔벨로프.

  • 하이브리드 벡터, SQLite FTS5, 중요도, 최신성 검색.

  • 바이트 제한 프로세스 RAM과 선택적 일회용 로컬 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

도서관 비유

구현

독서대

모델로 전송되는 엄격히 제한된 프롬프트

책

텍스트, 출처, 메타데이터, 임베딩을 포함한 컨텍스트 레코드

목록

하이브리드 어휘 및 벡터 검색

인접 서가

프로세스 RAM 및 선택적 로컬 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 게이트웨이

prepare -> model -> commit을 통한 자동 제한 컨텍스트

MCP도 모델 호출 훅도 없는 폐쇄형 호스트

투명한 통합 불가

Codex, Python, HTTP 구성 예제는 Add the Library to your agent를 참조하세요. 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를 정확히 그대로 전송해야 합니다. 다른 대화 기록을 추가하거나 제공자 관리 대화를 계속해서는 안 됩니다. 내장 어댑터는 텍스트 전용입니다. 구조화된 도구 호출, 스트림, 첨부 파일, 멀티모달 콘텐츠에는 사용자 정의 직렬화 어댑터가 필요합니다.

전체 프로토콜은 Context Governor를 참조하세요.

MCP 통합

일반 MCP 에이전트의 경우 integrations/README.md의 프로젝트 격리 템플릿과 병합 준비 완료 에이전트 지침을 사용하세요. 이는 협력적 메모리이며 호스트의 네이티브 대화 기록을 제어하지 않습니다.

로컬 STDIO 서버는 다음으로 검사할 수 있습니다:

python -m library_of_context.mcp_server --no-redis

모델 호출 경계를 소유한 사용자 정의 MCP 게이트웨이는 다음을 사용할 수 있습니다:

도구

용도

library_context_prepare

사용자 턴을 기록하고 제한된 다음 요청을 구성

library_context_commit

어시스턴트 또는 도구 결과를 기록

library_context_protect

중요한 상태를 모든 프롬프트에 포함되도록 유지

library_context_release

보호된 상태를 일반 페이징으로 복귀

library_context_status

워터마크, 큐 압력, 작업자 상태 검사

library_context_flush

인덱싱이 기록된 워터마크에 도달할 때까지 대기

Library는 선반, 검색, 독서대, 무상태 세션, 거버너 도구를 노출합니다. 게이트웨이 전용 도구는 반환된 messages를 완전한 다음 모델 요청으로 전송하는 호스트에서만 활성화하세요.

로컬 HTTP API

python -m library_of_context --no-redis serve

거버너 엔드포인트:

메서드

경로

용도

POST

/context/prepare

영속적 추가 및 제한된 프롬프트 구성

POST

/context/commit

영속적 어시스턴트/도구 결과 추가

POST

/context/protect

보호된 컨텍스트 추가

POST

/context/release

보호된 컨텍스트 해제

POST

/context/flush

비동기 인덱스 가시성 대기

GET

/context/status/{session}

거버너 상태 및 워터마크 검사

/books, /library/ingest, /catalog/query, /desk/* 라우트는 하위 수준 라이브러리를 노출합니다. 서버는 루프백에 바인딩되며 인증이 없습니다. 다른 머신에 직접 노출하지 마세요.

스토리지 계층

  1. 최근 링: 스레드별 순서 이벤트, 이벤트 수와 예상 토큰 목표로 제한. 신선한 컨텍스트가 보이도록 과대 이벤트 하나는 상주할 수 있습니다. 프롬프트 조립은 모델에 보이는 뷰를 하드 엔벨로프 예산으로 자릅니다. 이는 LRU가 아닙니다. 대화 순서가 중요합니다.

  2. 프로세스 RAM: 핫 북과 검색 결과를 위한 바이트 제한 LRU.

  3. 로컬 Redis: 핫 북, 쿼리, 독서대, TTL, 무효화 세대를 위한 선택적 공유 캐시.

  4. 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 doctor

doctor는 스토리지 계층을 확인하면서 구성된 SQLite 데이터베이스를 엽니다. 위 예제는 data/redis-check.sqlite를 생성합니다.

SQLite와 프로세스 RAM으로 충분하다면 모든 곳에서 --no-redis를 사용하세요.

성능 한도

프롬프트 조립은 제한되며 기록된 이벤트는 트랜잭션 아웃박스를 사용합니다. FTS는 제한된 후보 집합을 반환하고, 벡터 검색은 네임스페이스의 모든 활성 레코드를 정확히 점수 계산합니다. 따라서 대규모 카탈로그 확장성 주장은 측정된 증거가 필요하며, 정확 경로가 선언된 한도를 초과할 때는 제한된 벡터 검색 어댑터가 필요합니다.

Performance and Scaling은 측정, SLO 기준, 벤치마크 질문을 정의합니다. Why These Improvements?는 더 단순한 대안, 도입 트리거, 증거 게이트를 비교하며, Roadmap은 조건부 작업을 순서대로 나열합니다.

문서

문서

목적

아키텍처

불변 조건, 계층, 일관성, 진화

관련 연구 및 설계 지형

인접 컨텍스트 및 메모리 접근 방식과의 1차 소스 비교

컨텍스트 거버너

Prepare/commit 프로토콜 및 실패 동작

기능 상태

구현됨, 실험적, 계획됨, 지원되지 않는 경계

시스템 설명서

교육용 시각적 둘러보기

성능 및 확장

감사 증거, NFR, 벤치마크 게이트

왜 이러한 개선인가요?

근거, 반론, 대안, 도입 트리거

팀 아키텍처

로컬 우선 협업 및 승격 설계

로드맵

마일스톤 및 열린 연구 질문

의사결정 브리프 템플릿

주요 제안에 필요한 "왜 / 왜 안 되는지 / 증거" 형식

기여

개발 워크플로 및 기여 영역

보안

위협 모델 및 취약점 신고

설계 방향을 함께 만들기

열린 설계 질문에는 다음이 포함됩니다:

  • 어떤 컨텍스트가 자동으로 보호되어야 하며, 누가 보호를 해제할 수 있을까요?

  • 문서 QA가 아닌 에이전트 스레드의 검색 품질은 어떻게 측정해야 할까요?

  • 100,000~1,000,000개 청크에 적합한 로컬 ANN 어댑터는 무엇일까요?

  • 브랜치는 컨텍스트를 어떻게 상속, 대체, 병합해야 할까요?

  • 비공개 스레드에서 팀 카탈로그로 승격하기에 안전하고 유용한 지식은 무엇일까요?

  • 공유 이벤트 플레인은 Redis Streams, NATS JetStream 또는 다른 브로커를 사용해야 할까요?

  • ACL 해지가 클라우드를 프롬프트 중요 경로에 두지 않고 로컬 캐시를 무효화하려면 어떻게 해야 할까요?

  • 서로 다른 모델 토크나이저에서 사용자에게 예측 가능하게 느껴지는 토큰 압력 정책은 무엇일까요?

더 자세한 목록은 ROADMAP.md에 있습니다. 질문, 벤치마크 결과, 설계 노트, 어댑터, 실패 테스트, 비평을 환영합니다.

기여

CONTRIBUTING.md를 읽고, 연구 질문이나 설계 제안을 열고, 풀 리퀘스트는 초점을 유지하세요. 이 프로젝트는 특히 재현 가능한 검색 벤치마크, ANN 어댑터, 토크나이저 통합, 개인정보 보호 검토, 큐 및 크래시 테스트, 에이전트 프레임워크 게이트웨이를 환영합니다.

라이선스

MIT © Library of Context 기여자.

Available Tools

16 tools
library_consultA
Read-onlyIdempotent

Search the off-desk Library with hybrid vector, lexical, importance, and recency ranking without changing the reading desk.

ParametersJSON Schema
NameRequiredDescriptionDefault
subjectYes
max_booksNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
catalog_filtersNoJSON catalog metadata or exact-match catalog filters.
minimum_relevanceNo

TDQS

A4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
roleNoassistant
contentYes
event_idNoOptional caller idempotency key for this result.
metadataNoJSON catalog metadata or exact-match catalog filters.
max_booksNo
protectedNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
importanceNo
session_idNocodex
token_budgetNo
recent_token_budgetNo
protected_token_budgetNo

TDQS

B3.3/5.0
Behavior4/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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_flushC
Idempotent

Wait until this thread's durable outbox has been embedded and indexed through its recorded watermark.

ParametersJSON Schema
NameRequiredDescriptionDefault
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex
timeout_secondsNo

TDQS

C2.9/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
focusNo
event_idNoOptional caller idempotency key for this turn.
metadataNoJSON catalog metadata or exact-match catalog filters.
max_booksNo
protectedNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
importanceNo
session_idNocodex
token_budgetNo
user_messageYes
system_promptNo
strict_freshnessNo
recent_token_budgetNo
protected_token_budgetNo

TDQS

B3.4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
roleNodeveloper
labelNo
contentYes
event_idNo
max_booksNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
importanceNo
session_idNocodex
token_budgetNo
recent_token_budgetNo
protected_token_budgetNo

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_releaseA
Idempotent

Release one protected event so it can be paged normally. The durable event is retained.

ParametersJSON Schema
NameRequiredDescriptionDefault
event_idYes
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex

TDQS

A3.8/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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_statusB
Read-onlyIdempotent

Read context-governor watermarks, queue occupancy, prompt pressure, and worker health for one agent thread.

ParametersJSON Schema
NameRequiredDescriptionDefault
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex

TDQS

B3.2/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters1/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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_getA
Read-onlyIdempotent

Read the latest bounded reading desk snapshot for a session.

ParametersJSON Schema
NameRequiredDescriptionDefault
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex

TDQS

A3.9/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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_refreshA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
subjectYes
keep_openNoBook IDs that must be considered first for the desk.
max_booksNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex
token_budgetNo
catalog_filtersNoJSON catalog metadata or exact-match catalog filters.

TDQS

A4.1/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_stopA
Idempotent

Stop periodic refresh for a reading-desk session. The current snapshot remains available.

ParametersJSON Schema
NameRequiredDescriptionDefault
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex

TDQS

A3.9/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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_watchB
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
subjectYes
keep_openNo
max_booksNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex
token_budgetNo
catalog_filtersNoJSON catalog metadata or exact-match catalog filters.
interval_secondsNo

TDQS

B3.3/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
roleYes
contentYes
collectionNoOptional library collection/namespace; defaults to the configured collection.
importanceNo
session_idNocodex

TDQS

B3.3/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
max_booksNo
collectionNoOptional library collection/namespace; defaults to the configured collection.
session_idNocodex
record_userNo
token_budgetNo
user_messageNo
system_promptNo
recent_token_budgetNo

TDQS

C2.7/5.0
Behavior3/5

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.

Conciseness3/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes
sourceNomcp
book_idNo
catalogNoJSON catalog metadata or exact-match catalog filters.
collectionNoOptional library collection/namespace; defaults to the configured collection.
importanceNo
shelf_life_secondsNo

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_documentA
DestructiveIdempotent

Chunk and persist a larger local text document as multiple books. Set replace_edition to replace prior chunks from the same source.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes
sourceYes
catalogNoJSON catalog metadata or exact-match catalog filters.
collectionNoOptional library collection/namespace; defaults to the configured collection.
importanceNo
chapter_tokensNo
overlap_tokensNo
replace_editionNo

TDQS

A4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_statsA
Read-onlyIdempotent

Inspect Library tier health, usage, cache hit/miss counters, and embedding configuration.

ParametersJSON Schema
NameRequiredDescriptionDefault
collectionNoOptional library collection/namespace; defaults to the configured collection.

TDQS

A3.6/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

  1. 16 tool updatesv0.3.0
    • First observedlibrary_consult
    • First observedlibrary_context_commit
    • First observedlibrary_context_flush
    • First observedlibrary_context_prepare
    • First observedlibrary_context_protect
    • First observedlibrary_context_release
    • First observedlibrary_context_status
    • First observedlibrary_desk_get
    • First observedlibrary_desk_refresh
    • First observedlibrary_desk_stop
    • First observedlibrary_desk_watch
    • First observedlibrary_message_record
    • First observedlibrary_prompt_build
    • First observedlibrary_shelve
    • First observedlibrary_shelve_document
    • First observedlibrary_stats

TDQS

B3.3/5.0

Scored across 16 tools

Disambiguation3/5

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.

Naming Consistency4/5

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.

Tool Count3/5

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.

Completeness4/5

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers