Skip to main content
Glama

huiwen-mcp

회원 도서관리 시스템(Libsys / OPAC)의 Model Context Protocol (MCP) 서버 —— AI를 위한 도서관 읽기 전용 데이터 게이트웨이: Claude / Cherry Studio / DeepSeek 등 AI 클라이언트가 안전하고 감사 가능하게 소장 장서, 복본 소장 현황, 유통 통계 및 연합 공동 목록을 검색할 수 있습니다.

대학 도서관에서 개발한 공식 어댑터 레이어로, 기본 읽기 전용, 최소 권한, 전 구간 감사의 보안 기준을 따릅니다.

  • 프로토콜: Model Context Protocol(Anthropic 개방형 표준, Yale Library의 목록 접속과 동일 기술 경로)

  • 런타임: Python ≥ 3.10 · FastMCP 3.x

  • 데이터 소스: demo(제로 의존성 데모) / opac(회원 OPAC 공개 웹 프로토콜) / oracle(회원 Libsys 데이터베이스 읽기 전용 직접 연결)

  • 오픈소스 라이선스: Apache-2.0(권장 방식, 라이선스 및 규정 준수 참조)


목차

  1. 기능 특징

  2. 시스템 설계 아이디어

  3. 구현 기술 방안

  4. 빠른 시작

  5. 설정 (환경 변수 / .env)

  6. 도구 목록

  7. 클라이언트 연동 예시

  8. 사용 시나리오

  9. 보안 및 규정 준수

  10. 테스트

  11. 프로젝트 구조

  12. Roadmap

  13. 라이선스 및 규정 준수

  14. 문제 해결


Related MCP server: dms-mcp-server

기능 특징

기능

설명

🔍 소장 검색

다중 필드 / 중국도서분류법 / 소장처 / 소장 필터 / 정렬 / 페이지네이션

📚 서지 상세

단권 전체 서지, 모든 소장 복본 상태 및 유통 통계

✅ 복본 소장

ISBN / 바코드 / 서명으로 대출 가능 상태 빠른 조회

🔥 인기 & 신간

인기 대출 순위, 최근 N일 신간 알림

🧭 분류 브라우징

중국도서분류법 분류/접두사 실시간 히트 수

📊 통계

총 소장 수 / 소장처별 / 분류별

🤝 연합 공동 목록

PROCAT 기관 간 공동 검색(선택 사항, 기본 비활성화, JWT 인증)

👤 이용자 데이터(admin)

현재 대출 중 / 대출 기록 / 연체료(PII 기본 비식별화)

🛡️ 보안

인증→속도 제한→PII/이용자 게이트→JSONL 감사; 기본 읽기 전용

🔌 전송

stdio(프로세스 내) / Streamable HTTP(서비스화)

🐳 배포

Docker 이미지(비root, 반복 가능한 빌드); 프로덕션/게이트웨이 수준 인증 방안은 docs/배포_가이드.md 참조

🧩 데이터 소스 플러그형

demo / opac / oracle 원클릭 전환, 동일 서명 도구

설계 트레이드오프: 쓰기 작업(연장, 예약, 상호대차 주문)은 의도적으로 구현하지 않음——이 프로젝트는 “안전하게 감사 가능하게 읽기”만 수행하며, 쓰기 경로는 모두 원래 업무 시스템과 수동 절차에 맡깁니다.


시스템 설계 아이디어

포지셔닝: 데이터 게이트웨이 / 스킬 레이어, 데이터베이스 프록시 아님

AI 클라이언트(대형 모델)가 절대 회원 데이터베이스에 직접 연결하지 않음. 모든 쿼리는 통제된 도구 캡슐화를 통해 이루어집니다:

┌─────────────── AI 客户端(Claude / Cherry Studio / 自研 Agent / 本地 LLM) ───────────────┐
│                                      │                                                    │
│             stdio(子进程协议)        │        Streamable HTTP(服务化 / 网关 / SSO)        │
└──────────────────────────────────────┼────────────────────────────────────────────────────┘
                                       ▼
┌───────────────────────────────────────────────────────────────────────────────────────┐
│   huiwen-mcp(FastMCP 3.x)                                                            │
│   ┌─────────────── 安全链 _guard ───────────────┐                                        │
│   │ 认证(Auth) → 限流(TokenBucket) → 门控(PII/读者) │   ← 每个工具必经                     │
│   └──────────────────────────────────────────────┘                                        │
│   │ 工具层:search_books / get_book_detail / union_search / get_reader_* / … (12 个)     │
│   └──────────────────────────────────┬───────────────────────────────────────────────────┘
                                       ▼
┌───────────────────────────────────────────────────────────────────────────────────────┐
│   适配器(可插拔数据源,统一 CatalogBackend 接口)                                       │
│   ├─ OracleBackend:白名单参数化 SQL(db/queries.py 封闭集)   → 汇文 Libsys 只读账号    │
│   ├─ OpacBackend:白名单参数调汇文 OPAC 公开网页协议           → opac 站点                │
│   └─ DemoBackend:内置样例数据                                 → 离线演示/测试            │
└───────────────────────────────────────────────────────────────────────────────────────┘
  • 각 레이어 단일 책임: 어댑터는 데이터 가져오기만 담당; _guard는 보안만 담당; 감사는 독립적으로 JSONL에 기록; 상위 AI는 도구 서명과만 상호작용하며 백엔드 차이를 인식하지 않음(세 백엔드 동일 서명).

  • 기본 보안: data_source=demo 제로 의존성으로 실행 가능; opac/oracle은 명시적 설정 필요; 이용자 민감 도구는 admin 토큰 필요; 쓰기 작업 기본 비활성화; 외부 연합 서비스 기본 비활성화.

왜 MCP를 선택했는가

  • MCP는 AI가 "데이터베이스/업무 시스템"에 연결하기 위한 개방형 표준(Anthropic 2024-11 발표, 생태계에 GitHub/클라우드 업체/데이터베이스 업체 포함). 폐쇄형 API 대신 개방형 표준 선택하여 다음을 보장: 클라이언트 교체 가능 (Claude/Cherry Studio/DeepSeek/자체 개발 Agent), 서비스 여러 시스템에서 재사용 가능, 장기적으로 업체에 종속되지 않음——Yale Library가 MCP로 목록에 접속한 것과 동일한 경로.

  • FastMCP는 서버 구현을 위해 stdio / HTTP 이중 전송을 제공하며, 단일 코드베이스로 프로세스 내 및 서비스화 배포를 동시에 지원.

전송 모드 선택: stdio vs HTTP

  • stdio: 프로세스 내에서 클라이언트와 함께 실행, 제로 운영, 지연 시간 최소, 개인/단일 시스템 AI 데스크톱 클라이언트에 적합.

  • HTTP(Streamable HTTP): 독립 서비스, 다중 사용자/중앙 집중식 배포에 적합; 앞단에 OAuth2/JWT 리버스 프록시와 캠퍼스 통합 인증을 배치하여 중앙 감사 가능.


구현 기술 방안

관심사

방안

MCP 서버

fastmcp>=2,<4; add_tool 등록; stdio/http 이중 run()

도구 서명 하드 제약

FastMCP 3.x는 *args/**kwargs가 있는 도구 함수를 거부 → 도구는 모두 명시적 타입 매개변수 사용; _guard는 functools.wraps로 래핑하고 kwargs를 전달(명시적 토큰 모델, **kwargs로 인한 프레임워크 거부 방지)

인증 체인

AuthConfig(Bearer) + RateLimit(토큰 버킷) + 이용자 레이어/PII 게이트(admin 토큰) + AuditLogger(JSONL)

Oracle 백엔드

python-oracledb; 11g → thick 모드(Instant Client), 12c+ → thin; SQL은 모두 db/queries.py에 캡슐화(매개변수화, 화이트리스트, 읽기 전용 계정)

OPAC 백엔드

화이트리스트 매개변수로 회원 공개 웹 프로토콜 구성(openlink.php 검색 / item.php 상세 / top_lend.php 인기), 공개 HTML 템플릿 파싱(선택자와 업체 템플릿을 항목별로 확인)

연합 공동 목록

POST {base}/api/search/listByQuery + {current,pageSize,items:[{field,value,logic,type}]} + ?tenantCode&tk=<JWT>(계약 실제 사이트에서 실측); 기본 비활성화

설정

HUIWEN_ 환경 변수(.env 자동 로드) + config.local.json(민감 값, git-ignored, 자동 병합)

모델

pydantic 명시적 결과 모델, 타입 안전, 직렬화 안정적

주요 계약(모두 실제 측정 확인 완료)

  • OPAC: 검색 결과 <ol id="search_book_list"> → <li class="book_list_info">, 서명/청구기호/소장 복본/대출 가능 복본/히트 수; 상세 페이지 복본 테이블; 인기 순위.

  • 연합 PROCAT: POST(GET→405); 인증은 쿼리 매개변수 tk=(JWT는 OPAC 이용자 세션 getReaderJwt에서 발급); items[].logic="1"(AND)/"2"(OR); 필드 매핑 any/title/author/subject/isbn/clcNumber/publisher/series. 자세한 내용은 docs/연합_공동_목록_검색.md 참조.

⚠️ OPAC / 연합 모두 업체 비공개 또는 타사 시스템이므로, 계약은 배포 버전에 따라 변경될 수 있습니다. 모든 연동 문서는 "실제 사이트 실측"을 기준으로 하며, tests/test_*_live.py에서 검증을 기록합니다.


빠른 시작

1) 설치

git clone <your-repo-url> && cd huiwen-mcp
# 方式 A:uv(推荐)
uv sync
# 方式 B:pip
python -m venv .venv
. .venv/bin/activate
pip install -e .

2) 제로 설정 실행(demo 데이터 소스, 오프라인)

HUIWEN_DATA_SOURCE=demo uv run huiwen-mcp        # stdio 模式
HUIWEN_DATA_SOURCE=demo HUIWEN_TRANSPORT=http uv run huiwen-mcp   # HTTP 模式

demo에 내장된 샘플 서지/이용자 데이터로, 스모크 테스트, 테스트 및 연동 교육에 사용 가능.

2b) Docker 원클릭 배포

docker build -t huiwen-mcp:latest .
docker run --rm -it -e HUIWEN_DATA_SOURCE=demo huiwen-mcp:latest   # stdio,离线可跑

# 服务化(HTTP + 认证 + 审计)
docker run -d --name huiwen -p 8765:8765 \
  -e HUIWEN_TRANSPORT=http -e HUIWEN_DATA_SOURCE=opac \
  -e HUIWEN_OPAC_BASE_URL=https://opac.example.edu.cn \
  -e HUIWEN_AUTH_ENABLED=true -e HUIWEN_AUTH_BEARER_TOKEN=<强随机> \
  -v huiwen-audit:/var/log/huiwen huiwen-mcp:latest

더 많은 내용(Oracle 11g thick / compose / 리버스 프록시 수준 인증 및 캠퍼스 CAS 연동)은 docs/배포_가이드.md 참조.

3) 실제 데이터 소스 연결(opac / oracle)

.env.example을 복사하여 .env로 만들고 작성(.env는 git-ignore됨):

cp .env.example .env
# 编辑 .env:设置 HUIWEN_DATA_SOURCE 与对应凭据
HUIWEN_DATA_SOURCE=opac
HUIWEN_OPAC_BASE_URL=https://opac.example.edu.cn      # 你们学校 OPAC 地址

또는 config.local.json 사용(민감 설정 자동 로드, 저장소에 커밋되지 않음).


설정 (환경 변수 / .env)

모든 설정은 환경 변수(접두사 HUIWEN_)로 주입 가능하며, .env 파일(자동 로드)도 지원합니다. 우선 순위: 환경 변수 > 명시적 config.json / CONFIG_PATH > config.local.json 자동 병합 > 내장 기본값.

공통

변수

설명

기본값

HUIWEN_DATA_SOURCE

demo / opac / oracle

demo

HUIWEN_TRANSPORT

stdio / http

stdio

HUIWEN_HOST / HUIWEN_PORT

HTTP 리스닝

127.0.0.1 / 8765

HUIWEN_INCLUDE_PII

이용자 민감 필드 출력 여부(admin 필요)

false

HUIWEN_AUDIT_LOG

JSONL 감사 로그 경로(비우면 비활성화)

빈 값

HUIWEN_CONFIG_LOCAL_PATH

로컬 민감 설정 파일 이름

config.local.json

OPAC

변수

설명

HUIWEN_OPAC_BASE_URL

회원 OPAC 루트 주소

HUIWEN_OPAC_TIMEOUT

검색 타임아웃(재활용 스테이션 15-40s 느림, 충분히 설정)

25s

HUIWEN_OPAC_ALLOW_READER_SESSION

이용자 로그인 후 개인 데이터 허용 여부(기본 비활성화)

HUIWEN_OPAC_UNION_ENABLED

연합 공동 목록 스위치(기본 비활성화)

HUIWEN_OPAC_UNION_BASE_URL

연합 서비스 주소

HUIWEN_OPAC_UNION_TENANT

테넌트 코드

HUIWEN_OPAC_UNION_TOKEN

이용자 세션 JWT(getReaderJwt 전체 문자열)

Oracle

변수

설명

HUIWEN_ORACLE_DSN

host:port/service 또는 Easy Connect

HUIWEN_ORACLE_USER / _PASSWORD

읽기 전용 계정(강력 권장)

HUIWEN_ORACLE_MODE

thin(12c+) / thick(11g/10g는 Instant Client 필요)

HUIWEN_ORACLE_CLIENT_LIB_DIR

thick 모드의 Instant Client 디렉토리

HUIWEN_ORACLE_READ_ONLY

의미상 읽기 전용 제약(기본 true)

HUIWEN_ORACLE_POOL_MIN/MAX

연결 풀 크기

보안

변수

설명

HUIWEN_AUTH_ENABLED

Bearer 인증 활성화 여부(프로덕션에서 반드시 켜야 함)

HUIWEN_AUTH_BEARER_TOKEN

정적 Bearer Token

HUIWEN_AUTH_ADMIN_TOKENS

쉼표로 구분된 admin 토큰(이용자/쓰기 관련 내보내기 도구용)

HUIWEN_RATE_LIMIT_ENABLED / _RPS / _BURST

토큰 버킷 속도 제한


도구 목록

도구

설명

토큰 필요

search_books

소장 서지 검색(필드/중국도서분류법/소장처/소장 필터/정렬/페이지네이션)

—

get_book_detail

단권 서지 전체 정보(모든 소장 복본 및 유통 통계 포함)

—

get_availability

ISBN/바코드/서명으로 복본 소장 및 대출 가능 상태 확인

—

get_hot_books

인기 대출 순위(중국도서분류법 카테고리로 필터 가능)

—

get_new_arrivals

최근 N일 신간 알림

—

browse_classification

중국도서분류법 분류 브라우징/접두사 실시간 히트 수

—

union_search

기관 간 연합 공동 목록 읽기 전용 검색(기본 비활성화)

설정

get_statistics

소장 통계(총 수/소장처별/분류별)

—

get_reader_borrowing

이용자 현재 대출 중

admin

get_reader_history

이용자 대출 기록

admin

get_reader_fines

이용자 연체료

admin

get_system_status

데이터 소스 및 서비스 상태

—

회원 ACS / SIP2 인터페이스 서비스의 기능 설명 및 연동 평가는 docs/회원ACS-SIP2_인터페이스_설명_및_연동_평가.md 참조(권위 있는 필드 매핑, 읽기 전용 하위 집합 후보, 명시적 비활성화 항목).

이용자 도구는 기본적으로 비식별화됨(include_pii=false 시 증명서 번호/연락처 등 반환하지 않음; true는 admin 필요).


클라이언트 연동 예시

Claude Desktop / MCP 지원 데스크톱 클라이언트

{
  "mcpServers": {
    "huiwen": {
      "command": "/path/to/uv",
      "args": ["--directory", "/path/to/huiwen-mcp", "run", "huiwen-mcp"],
      "env": { "HUIWEN_DATA_SOURCE": "demo" }
    }
  }
}

원격 HTTP(게이트웨이에서 직접 인증 설정 필요)

HUIWEN_TRANSPORT=http HUIWEN_HOST=0.0.0.0 HUIWEN_PORT=8765 uv run huiwen-mcp

클라이언트는 ${MCP_SERVER_URL}을 사용하여 http://<host>:8765/mcp/(Streamable HTTP)에 연결합니다. HUIWEN_AUTH_ENABLED=true 활성화 시, 토큰은 **도구 매개변수 token**을 통해 호출 시 전달됩니다; HTTP Authorization 헤더는 서버에서 소비되지 않음(배포 가이드 §3.2 참조).


사용 시나리오

대상

시나리오

이용자

"《삼체》 있어? 몇 층? 몇 권 대출 가능? 주변 인기 도서는?" —— 책 찾기/시험 준비/연구 올인원

참고봉사 사서

자동 소장/복본 조회 → 답변 초안 생성 → 수동 확인(Copilot 모드)

학과 사서

학과 서지, 문헌 지원 통계, 학과 추천 구매 보고서

수서/편목

ISBN 중복 확인, 미소장 분석, 신간 알림, 메타데이터 검증

도서관장

소장/유통 통계 차트, 데이터 주간 보고서

AI 사서 포털

지능형 Q&A/지능형 도서 추천의 핵심 데이터 레이어

연합共建

기관 간 공동 검색(미소장→연합에서 책 찾기→공식 상호대차 진행)

전체 제안(로컬 배포 LLM + RAG의 계층적 방안 및 국내외 대비 포함)은 docs/서비스_및_응용_제안.md 참조.


보안 및 규정 준수

  1. 기본 읽기 전용: 모든 도구 읽기 전용; 쓰기 작업(연장/예약/상호대차 주문)은 의도적으로 구현하지 않음.

  2. 화이트리스트 SQL: Oracle 백엔드는 db/queries.py 내 매개변수화된 SQL 폐쇄 집합만 실행, 자유 SQL 없음.

  3. 전 구간 게이트: 인증 → 속도 제한 → 이용자/PII 게이트 → 감사(JSONL). 이용자 개인 데이터는 admin 토큰 필요하며 기본적으로 비식별화.

  4. 인증 계약(실제 측정 확인): 토큰은 **도구 매개변수 token**을 통해 전달됨(각 도구 선택적 매개변수, _guard가 매개변수에서 추출하여 HUIWEN_AUTH_BEARER_TOKEN과 비교), HTTP Authorization 헤더의 투과는 구현하지 않음——전송 계층 TLS/통합 인증은 리버스 프록시 게이트웨이가 담당하며, huiwen-mcp 자체 인증은 게이트웨이 뒤의 두 번째 방어선입니다. 토큰은 감사 로그에 기록되지 않음 (_guard가 먼저 pop한 후 기록).

  5. 키 저장소에 커밋되지 않음: DSN/비밀번호/JWT/사이트 주소는 환경 변수 또는 config.local.json (git-ignored)을 통해서만 전달. 저장소에는 실제 배포 데이터가 포함되지 않음(NOTICE 참조).

  6. 외부 서비스 신중: 연합 PROCAT은 타사 멀티 테넌트 시스템으로, 기본 비활성화; 활성화 전에 연합/서비스 제공자와 권한 확인. OPAC은 폐쇄형이며, 역사적으로 공개 취약점이 존재, 어댑터는 화이트리스트 매개변수만 사용.

  7. 취약점 보고 및 처리는 SECURITY.md 참조.


테스트

파일

내용

실행

tests/smoke_demo.py

demo 백엔드 스모크(오프라인)

uv run python tests/smoke_demo.py

tests/test_stdio.py

stdio 통합/인증 회귀(demo)

uv run python tests/test_stdio.py

tests/test_oracle_live.py

실제 데이터베이스 통합(기본 비활성화)

HUIWEN_LIVE_ORACLE=1 ...

tests/test_union_live.py

연합 PROCAT 실제 사이트(기본 비활성화)

HUIWEN_LIVE_UNION=1 ...

실제 데이터베이스/실제 사이트 테스트는 기본 비활성화(로컬에서 명시적으로 HUIWEN_LIVE_* 설정해야 실행), 실제 시스템에 접촉하지 않도록 방지. Docker 이미지는 기본적으로 빌드/배포되지 않음(배포 정책은 "소스 코드와 문서만 배포"): 이미지가 필요하면 로컬에서 직접 docker build(Oracle thick 모드는 --build-arg WITH_INSTANT_CLIENT=true 추가).


프로젝트 구조

huiwen-mcp/
├── src/huiwen_mcp/
│   ├── server.py            # FastMCP 装配、stdio/http 启动、main()
│   ├── config.py            # 配置:env/.env/config.local.json 分层合并
│   ├── audit.py             # JSONL 审计
│   ├── adapters/
│   │   ├── base.py          # CatalogBackend 抽象
│   │   ├── demo.py          # 内置演示数据
│   │   ├── opac.py          # 汇文 OPAC 网页协议(含 union_search)
│   │   └── oracle.py        # Libsys 数据库只读(thin/thick)
│   ├── db/queries.py        # 白名单参数化 SQL(Oracle 后端唯一 SQL 来源)
│   ├── models/schemas.py    # pydantic 结果模型
│   └── tools/catalog.py     # 12 个 MCP 工具 + _guard 安全链
├── docs/                    # 表结构 / 联盟契约 / 服务与应用建议 / 部署指南 / SIP2 评估
├── tests/                   # demo/stdio/oracle-live/union-live
├── Dockerfile / compose.yaml / .dockerignore
├── .env.example / config.example.json / config.local.json(忽略)
├── LICENSE / NOTICE / SECURITY.md / CONTRIBUTING.md / CODE_OF_CONDUCT.md
└── pyproject.toml

Roadmap

  • Phase 1: 읽기 전용 검색 MCP(demo + opac + oracle 세 백엔드)

  • Phase 2: OPAC / Oracle 실제 데이터베이스 연동, 연합 공동 목록 연동(계약 실제 측정 + 토큰 방식)

  • Phase 2 잔여 항목: Docker 이미지(비root, 반복 가능한 빌드) + 배포 가이드(리버스 프록시 수준 인증 템플릿 포함)

  • 이미 출시: v1.0.0 tag + GitHub Release(소스 코드와 문서; CI/워크플로우 없음, Docker 이미지 자동 빌드 안 함)

  • OAuth2/JWT 게이트웨이落地 캠퍼스 CAS / 통합 서비스 플랫폼 연동(템플릿 준비 완료, 현장 설정 필요)

  • Phase 2.5/3 후보: 회원 ACS/SIP2 읽기 전용 하위 집합(평가는 docs/회원ACS-SIP2_인터페이스_설명_및_연동_평가.md 참조)

  • Phase 3: RAG 벡터 라이브러리 + 로컬 LLM 지능형 도서 추천 / 참고 문의( docs/서비스_및_응용_제안.md 참조)

  • Phase 4: 회원 차세대 플랫폼 OpenAPI 연동


라이선스 및 규정 준수 (Open Source & Compliance)

오픈소스 라이선스 버전 제안

본 프로젝트는 Apache License 2.0을 권장합니다(저장소에 전체 LICENSE 첨부):

  1. 관용적(permissive) : 대학, 제조사, 클라우드 플랫폼이 자유롭게 사용/수정/재배포(상업적 사용 포함)할 수 있으며, 저작권 및 라이선스 고지만 유지하면 됩니다. 이는 AI 도구 체인 및 타사 시스템에 채택되기 유리합니다.

  2. 특허 라이선스 : Apache-2.0은 기여자에게 특허 사용 라이선스를 명시적으로 부여(제3조)하므로, 여러 기관/다수(여러 대학 연합, 기술 제조사)가 공동으로 기여할 때 더 명확하고 '항변에 강합니다'.

  3. 기여자 조항 규범 : 프로젝트에 대한 묵시적 라이선스 부여(제5조 Contribution Grant)로 각 기여자가 별도로 CLA에 서명할 부담을 없애며, GitHub 공개 프로젝트 관행에 부합합니다.

  4. 차별성 : MIT에 비해 Apache-2.0은 기관 신분으로 공식 발행되고 여러 주체가 장기 유지할 가능성이 있는 인프라형 프로젝트에 더 적합합니다.

귀관이 '미니멀 스타일'을 더 선호한다면 언제든지 MIT로 되돌릴 수 있습니다. LICENSE 전체를 교체하고, pyproject.toml의 license를 { text = "MIT" }로 되돌린 후, README의 이 단락을 업데이트하면 됩니다.

규정 준수 선언(중요)

  • 제조사/타사 소스 코드 미포함 : 본 프로젝트는 폐쇄형 Huiwen/Libsys의 독립 상호운용 계층으로, Huiwen 또는 연합 측의 독점 코드를 포함하지 않습니다. OPAC/연합 계약은 공개 웹 페이지 프로토콜과 실제 사이트 응답 기록에만 기반합니다. 자세한 내용은 NOTICE를 참조하세요.

  • 저장소에 배포 민감 데이터 미포함 : 실제 DSN, 계정 비밀번호, OPAC 로그인 인스턴스, 연합 JWT, 독자 PII, 제조사 SECRET_KEY 등은 저장소 내에 없습니다(SECURITY.md/CONTRIBUTING.md에 이미 레드라인이 설정되어 의심스러운 민감 데이터의 저장소 유입을 엄격히 금지합니다).

  • 상표 : Huiwen, Libsys, OPAC은 각각 Jiangsu Huiwen Software 등의 권리자의 상표/제품명이며, 본 저장소는 상호운용 지칭 목적으로만 사용하며 보증이나 연관을 암시하지 않습니다.

  • 본 소프트웨어를 사용하기 전에 Huiwen Software, 연합 서비스 제공자 및 귀관의 정보 센터와 권한 및 사용 범위를 확인하시기 바랍니다.


문제 해결

현상

처리

"해당 백엔드를 지원하지 않습니다"

HUIWEN_DATA_SOURCE 확인; union_search는 opac 백엔드만 가능하며 연합 구성이 활성화되어야 함

Oracle DPY-3010 / 연결 실패

11g는 HUIWEN_ORACLE_MODE=thick + HUIWEN_ORACLE_CLIENT_LIB_DIR(Instant Client) 사용

OPAC 검색 시간 초과

사이트 측 지연(15-40초 일반), HUIWEN_OPAC_TIMEOUT 증가 또는 나중에 재시도

union_search가 enabled:false 반환

연합이 활성화되지 않았거나 토큰 누락 → 구성 활성화 및 JWT 입력

연합이 storage token not found 반환

JWT 만료 → OPAC에 다시 로그인하여 getReaderJwt로 토큰 업데이트

프레임워크가 도구 등록 거부(*args/**kwargs)

도구 함수는 명시적 매개변수를 사용해야 함; *args/**kwargs 서명 사용 금지

독자 도구가 "관리자 토큰 필요" 반환

HUIWEN_AUTH_ADMIN_TOKENS의 토큰 사용

Available Tools

12 tools
browse_classificationB

中图法分类浏览:传入分类号前缀(如 'T')返回该类目馆藏统计。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo
prefixNo分类号前缀;为空返回各大类

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states that the tool returns collection statistics, without confirming it is read-only, safe, or clarifying any side effects, auth requirements, or error handling. This is insufficient for a tool with no 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 a single short sentence, which is concise and front-loaded. However, it could be more structured by explicitly listing the parameters or adding a brief usage note. It is efficient but not maximally informative.

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 an output schema exists, so the description does not need to explain return values. However, the description omits the token parameter entirely and lacks usage guidelines, making it incomplete for an agent to fully understand the tool's capabilities. It provides the core purpose but not enough context for correct invocation in all scenarios.

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 description coverage is 50% (only prefix has a description). The tool description adds a concrete example for prefix ('如 'T'') and rephrases the schema description, but it does not explain the token parameter at all. While the example adds value, the missing token documentation leaves a gap.

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 'browse' (浏览) and resource 'Chinese Library Classification' (中图法分类), with the specific action of passing a classification prefix and returning collection statistics. It distinguishes itself from sibling tools like search_books and get_book_detail by focusing on classification-based browsing.

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 when to use the tool: when you have a classification prefix to browse. However, it does not explicitly state when not to use it or provide alternatives, such as using search_books for keyword searches. The context of sibling tools provides some implicit guidance, but the description lacks direct usage instructions.

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

get_availabilityA

按 ISBN / 条码 / 题名查询馆藏复本在馆(可借)状态。

ParametersJSON Schema
NameRequiredDescriptionDefault
isbnNoISBN 号(优先)
titleNo题名(demo 后端支持;oracle 后端请用 search_books)
tokenNo
barcodeNo条码号(优先于 isbn 匹配)

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It conveys the tool is a read-only query for availability, which is reasonable. However, it does not disclose details such as whether it returns full availability per branch, pagination behavior, or rate limiting. With no annotations, more transparency would be beneficial.

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 that front-loads the core purpose. It uses common separators (slashes) to list alternatives clearly. Every word contributes meaning without 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 has moderate complexity (4 params, 0 required) and an output schema exists (agents can infer return format from there), the description adequately covers the core purpose. It does not explain the token parameter or the exact response structure, but the output schema compensates. Minor gap is the lack of hint about how multiple search criteria interact (e.g., AND vs OR).

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 high at 75%, so the schema already documents ISBN, title, and barcode semantics well. The description repeats the search fields but adds no additional parameter-level guidance beyond what the schema provides. The token parameter's role remains unclear from both schema and description, preventing a higher score.

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 this tool queries library copy availability by ISBN, barcode, or title. It uses a specific verb-resource combination ('查询馆藏复本在馆状态') that distinguishes it from siblings like search_books or get_book_detail.

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 context—to check availability—and the input schema provides a hint that for title queries with an Oracle backend, search_books should be used instead. However, there is no explicit when-to-use vs. when-not-to-use guidance for ISBN or barcode searches versus other tools.

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

get_book_detailA

获取单册书目完整信息(含全部馆藏复本状态与流通统计)。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo
marc_noYesMARC 记录号(search_books 结果中的 marc_no)

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are present, so the description carries full burden. It states data retrieval but does not disclose whether this is a read-only operation, any authentication requirements, rate limits, or side effects. The behavioral disclosure is minimal and relies on inference.

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 zero waste. Every part contributes to defining the tool's purpose and key outputs.

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 presence of an output schema and the tool's focused purpose (retrieve single book details with copy status and circulation), the description is largely complete. It could benefit from including when to use and behavioral notes, but is still adequate.

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% (one param documented, one not). The description adds no explanation for the undocumented 'token' parameter and does not elaborate on parameter semantics beyond what the schema provides. It does not compensate for the gap.

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 verb (获取/get), the resource (单册书目完整信息/complete information of a single book), and explicitly lists included data (馆藏复本状态与流通统计). This uniquely distinguishes it from sibling tools like search_books, get_availability, and get_statistics.

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 complete single-book info with copy status and circulation is needed, but provides no explicit guidance on when to use this tool vs alternatives, nor any prerequisites or exclusions.

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

get_hot_booksA

热门借阅图书排行(可按中图法大类过滤)。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo
top_nNo返回条数(<=50)
cls_noNo中图法分类号前缀(如 'I')
periodNototal|yeartotal

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not mention side effects, authentication needs, rate limits, data freshness, or pagination behavior. The token parameter is left unexplained, and the description assumes a read-only ranking but does not explicitly confirm safety or data source.

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 Chinese sentence that states the core function and filtering capability. It is front-loaded with the key purpose and has zero wasted words, making it easy for an agent to parse quickly.

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 presence of an output schema (which presumably defines the return format), a simple parameter list with defaults, and a straightforward ranking task, the description covers the essential use case. However, it omits details like output ordering, how 'hot' is determined, and token handling, but the output schema may address some of this. It is nearly complete for a tool of this complexity.

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 75% with top_n, cls_no, and period having Chinese descriptions that specify constraints (≤50, prefix, total/year). The description adds minimal extra value beyond the schema by mentioning classification filtering, but token remains undocumented. Baseline is 3 due to high coverage, and no substantial semantic enrichment is provided.

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 purpose: retrieving a ranking of hot borrowed books ('热门借阅图书排行') with optional filtering by Chinese library classification ('可按中图法大类过滤'). This directly distinguishes it from siblings like search_books (general search), get_new_arrivals (new arrivals), and browse_classification (browsing taxonomy) by focusing on popularity ranking.

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 the tool is for obtaining a hot borrowing list with optional classification filtering, but it provides no explicit guidance on when to use it versus alternatives like search_books or get_statistics. There is no mention of prerequisites, auth requirements (despite the token parameter), or when not to use this tool.

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

get_new_arrivalsC

近 N 天新书通报。

ParametersJSON Schema
NameRequiredDescriptionDefault
clcNo中图法分类号前缀过滤
daysNo时间范围(天)
tokenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are present, so the description must fully disclose behavioral traits. The one-sentence description only states the tool's purpose; it does not mention whether it is a read-only operation, pagination, authentication requirements, or any side effects. This is insufficient for an agent to understand 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 extremely concise (one sentence), which is efficient but lacks essential details. It is not structured with front-loading or bullet points. While brevity is valued, it sacrifices clarity and completeness.

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?

Despite the presence of an output schema, the description is too minimal to provide complete context. It does not explain what the output represents, how the parameters modify behavior, or any edge cases. For a tool with three parameters and no annotations, the description is insufficient.

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. Although schema coverage is 67% (two parameters have descriptions in the schema), the tool description does not explain how 'clc' or 'days' affect results, and the 'token' parameter remains undocumented. The description fails to compensate for the missing schema description.

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 '近 N 天新书通报' (new book announcements for the last N days) clearly indicates the tool retrieves recently added books. The verb 'get' is implied by the name, and the resource is 'new arrivals'. While it is distinct from siblings like search_books or get_hot_books, it does not explicitly differentiate its scope or usage.

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. The description does not mention prerequisites, context, or exclusions (e.g., when to use search_books instead). An agent has no information about the appropriate use case.

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

get_reader_borrowingA

读者当前借阅(需 admin 认证令牌)。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo
cert_idYes读者证件号 CERT_ID
include_piiNo是否返回实名(默认脱敏/隐藏)

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It mentions the admin token requirement but fails to describe the response format, rate limits, or data privacy implications (e.g., the 'include_pii' parameter suggests sensitive data handling). With no annotations, crucial behavioral details like read-only nature or possible errors are missing.

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 very concise (one short sentence) with no redundancy. It front-loads the core purpose ('读者当前借阅') and adds the critical auth requirement. However, it could be slightly more structured (e.g., separated into purpose and usage note) without losing brevity.

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 has 3 parameters (with 67% schema coverage), an output schema, and a clear sibling set, the description adequately signals the core function and auth need. However, it doesn't explain the return format or what happens when the token is missing, but the output schema likely covers return values. The complexity is moderate, and the description almost fully compensates for missing annotations.

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 coverage is 67% (2 of 3 parameters have descriptions: 'cert_id' is described as '读者证件号 CERT_ID', and 'include_pii' has a clear explanation). The description adds context about the token being an admin auth requirement, which complements the schema. The 'include_pii' parameter's description in the schema is already informative, and the tool name implies purpose, so the remaining gap is minimal.

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 explicitly states '读者当前借阅' (reader's current borrowing) with the specific verb 'get' implied by the tool name and '需 admin 认证令牌' (requires admin auth token). It clearly distinguishes from siblings like 'get_reader_history' (historical borrowing) and 'get_reader_fines' (fines), making it unique among reader-related 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 mentions the need for an admin token and implies this is for current borrowing status. However, it does not explicitly exclude when to use alternatives like 'get_reader_history' for past records, nor does it provide clear context on prerequisites beyond the token. Still, the admin token requirement is a strong usage signal that helps the agent decide when to invoke this tool.

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

get_reader_finesB

读者欠款 / 罚款明细(需 admin 认证令牌)。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo
cert_idYes读者证件号 CERT_ID
include_piiNo是否返回实名(默认脱敏/隐藏)

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It mentions the need for an admin token, which hints at security/permission behavior. It does not disclose whether the operation is read-only, destructive, or has side effects. The parameter include_pii with default false suggests privacy behavior (data masking), but this is not explained in the description. With no annotations, a score of 3 reflects partial disclosure.

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 extremely concise (one short sentence in Chinese with a parenthetical note). It front-loads the core purpose and an important constraint. It could be slightly more structured or include an English explanation, but for a bilingual context it is efficient.

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 has an output schema (so return values don't need explaining), 3 parameters, and no annotations, the description covers the core purpose and one critical constraint (admin token). It does not explain why include_pii exists or how to handle errors, but with the output schema and moderate complexity, this is reasonably complete.

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 67% (2 out of 3 parameters documented: cert_id and include_pii). The description adds value beyond the schema by stating '需 admin 认证令牌' which implies the token parameter must be supplied with an admin-level token. It does not describe cert_id semantics further, but the schema already does that. The missing parameter (token) is implicitly addressed by the authentication hint in the description.

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 uses Chinese to state '读者欠款 / 罚款明细' meaning 'reader fines/fee details', which clearly indicates retrieving fine details for a reader. This distinguishes the tool from siblings like get_reader_borrowing (borrowing records) and get_reader_history (reading history). However, the verb is implicit, so it is not a perfect 5.

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 adds '需 admin 认证令牌' meaning 'requires admin authentication token', which implies when to use the tool (must have admin rights). However, it provides no guidance on when not to use this tool or how it compares to siblings like get_statistics or union_search. The only usage hint is the authentication requirement, which is insufficient for an agent deciding among 12 sibling tools.

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

get_reader_historyC

读者借阅历史(需 admin 认证令牌)。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo
cert_idYes读者证件号 CERT_ID
include_piiNo是否返回实名(默认脱敏/隐藏)

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description bears full responsibility. It states 'requires admin authentication token' but does not disclose whether the tool is read-only, what data it returns (history, pagination, etc.), or any potential side effects. This is insufficient for safe agent invocation.

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, front-loaded sentence. It conveys purpose and the critical admin requirement without wasted words. However, it is extremely brief, bordering on under specification, which reduces the score from 5.

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?

Despite having 3 parameters, an output schema, and no annotations, the description only covers purpose and auth. It omits usage context, parameter guidance, and behavioral traits like read-only nature. For a tool with moderate complexity, this is 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?

Schema coverage is 67% (2 of 3 parameters have descriptions in the schema). The description adds no parameter information, such as explaining what cert_id represents or when include_pii should be true. Given moderate coverage, the description should at least echo parameter roles, which it fails to do.

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 identifies the tool as retrieving a reader's borrowing history. It includes the admin authentication requirement, adding specificity. However, it does not explicitly distinguish from sibling get_reader_borrowing, which likely handles current borrows. The Chinese-only phrasing may limit understanding for non-Chinese agents, but the purpose is unambiguous.

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 on when to use this versus siblings like get_reader_borrowing or get_reader_fines. The only usage hint is the admin auth requirement, which is a prerequisite, not a selection criterion. An agent would need to infer from the name alone.

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

get_statisticsD

馆藏统计。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo
metricNototal(总数)| by_location(按馆藏地)| by_clc(按分类)total
range_descNo统计时间范围描述(如 '2026')

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

D1.7/5.0
Behavior1/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. It does not state whether the tool is read-only, requires authentication, has rate limits, or any side effects. The single phrase offers no transparency beyond a vague topic.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short (four characters) but under-specified. It does not earn its place because it provides almost no useful information. True conciseness requires meaningful content, not mere brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has three parameters, an output schema, and multiple sibling tools, the description is grossly incomplete. It does not explain the return structure, parameter usage, or how to interpret the output. The agent cannot infer proper usage from this description alone.

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 meaning beyond the input schema. The schema already describes two of three parameters (metric and range_desc) with explicit options; the description does not summarize or clarify them. The token parameter lacks a schema description and the tool description does not help either. With 67% schema coverage, the description should compensate but fails to do so.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '馆藏统计' (collection statistics) gives a vague sense of the tool's domain but lacks a specific verb or action. It does not clarify what the tool returns or how it differs from sibling tools like search_books or get_availability. The purpose is only marginally clearer than the tool name itself.

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 context, prerequisites, or when not to use it. The description does not hint at any selective use cases, leaving the agent without decision support.

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

get_system_statusB

返回当前数据源与后端健康状态。

ParametersJSON Schema
NameRequiredDescriptionDefault
tokenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states that it returns health status, but does not mention whether the optional token parameter is used for authentication, whether any side effects exist, or how health is determined. The behavior remains largely opaque beyond the basic return.

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, front-loaded sentence with no filler, stating the core purpose efficiently. It is appropriately sized for a simple status tool, though it omits some detail. The structure is clean and direct.

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?

Despite the simplicity of the tool (one optional parameter, output schema present), the description is incomplete because it fails to explain the token parameter and provides no behavioral context. The output schema mitigates return-format uncertainty, but the agent lacks enough information to confidently invoke the tool correctly.

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 input schema description coverage is 0%, and the description does not mention the 'token' parameter at all. The schema shows it is an optional string or null, but its purpose (e.g., authentication, context) is completely unexplained, leaving the agent to guess how to use it.

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 a specific verb ('返回' = returns) and resource ('数据源与后端健康状态' = data source and backend health status). This distinct purpose sets it apart from sibling tools like search_books and get_book_detail, which are book-related queries.

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?

No explicit usage guidance or alternatives are provided. The purpose implies a system health check, and sibling tools are all book-related, which makes the intended usage inferable, but the description does not state when to use this tool (e.g., 'to verify backend health') or contrast it with alternatives.

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

search_booksB

检索馆藏书目。返回题名/责任者/出版社/ISBN/馆藏地在馆信息列表。

ParametersJSON Schema
NameRequiredDescriptionDefault
clcNo中图法分类号前缀(如 'T'、'TP')
pageNo
sortNorelevance|circulation|daterelevance
fieldNoany|title|author|subject|publisher|isbn|callno|yearany
queryYes检索词
tokenNo
locationNo馆藏地代码
page_sizeNo
pub_year_maxNo
pub_year_minNo
in_library_onlyNo是否只返回有在馆复本的图书

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states 'search' and lists output fields, which implies a read-only operation but does not explicitly declare it. It does not mention authentication requirements, rate limits, side effects, or any constraints. For a search tool with 11 parameters, this is insufficient transparency.

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 extremely concise: two sentences. The first sentence states the primary action, and the second lists the returned fields. Every word is functional, and the structure is front-loaded. There is 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 has 11 parameters, an output schema exists, and there are 12 sibling tools, the description is too minimal. It does not explain pagination, field-specific search, date filtering, location filtering, or the token parameter. The agent would lack essential context to use the tool effectively, especially for non-trivial queries.

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 any of the 11 parameters. Schema coverage is 55% (6 parameters have descriptions in the schema), but the description does not compensate for the 5 parameters without descriptions (page, page_size, pub_year_min, pub_year_max, token). It also does not explain how the query parameter is interpreted (e.g., keyword matching, Boolean operators). The output description is helpful but does not aid parameter usage.

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 core function: searching the library catalog and returning a list of specific fields (title, author, publisher, ISBN, location, availability). The verb '检索' (search) is specific and the resource '馆藏书目' (library catalog) is well-defined. While it does not explicitly distinguish from siblings, the sibling tools are mostly specialized (detail, availability, hot, new, classification), making this the general search tool.

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 alternatives. It does not mention any prerequisites, exclusions, or specific contexts. With 12 sibling tools including get_book_detail, browse_classification, and union_search, the lack of differentiation or usage hints leaves the agent to infer usage from the name alone.

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. 12 tool updatesv0.1.0
    • First observedbrowse_classification
    • First observedget_availability
    • First observedget_book_detail
    • First observedget_hot_books
    • First observedget_new_arrivals
    • First observedget_reader_borrowing
    • First observedget_reader_fines
    • First observedget_reader_history
    • First observedget_statistics
    • First observedget_system_status
    • First observedsearch_books
    • First observedunion_search

TDQS

B3.2/5.0

Scored across 12 tools

Disambiguation4/5

Most tools have clearly distinct purposes: book searching, detail retrieval, availability checking, hot books, new arrivals, classification browsing, statistics, system status, union search, and reader-specific operations. However, get_reader_borrowing, get_reader_history, and get_reader_fines all relate to reader accounts and could be conflated if descriptions were less precise, but their names clearly differentiate them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case: search_books, get_book_detail, get_hot_books, etc. The pattern is predictable and makes the toolset easy to navigate.

Tool Count5/5

With 12 tools, the count is well within the ideal range. The toolset covers public catalog operations, reader management, and system administration without being excessive or minimal.

Completeness3/5

The toolset provides comprehensive read-only access to library catalog and reader information. However, it is explicitly limited to read-only operations, lacking any write capabilities (e.g., placing holds, renewing items) which are natural expectations for a library system. The union_search tool's description also notes it does not implement interlibrary loan ordering, which is a gap.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Read-only MCP server that connects AI clients to Crescender's school asset, loan, member, and asset-comms API.
    6
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Read-only MCP server that lets AI clients query DMS repositories through a local bridge, supporting tools for health checks, listing connections and items, retrieving item info, and reading documents. Credentials are handled securely via a separate broker.
    7
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for AI clients to browse and search project files securely, with configurable permissions, virtual paths, and key-based access.
    -
  • F
    license
    B
    quality
    C
    maintenance
    A secure, read-only MCP server that enables AI assistants to inspect transactions, vendor performance, wallet balances, and analytics through validated REST API calls.
    19
    -