Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CWA_BASE_URLYesCWA 实例的基础地址,例如 http://localhost:8083。
CWA_PASSWORDYesCWA 密码。
CWA_USERNAMEYesCWA 用户名。
PUBLIC_BASE_URLNo远端文件链接所需的 Agent 可达公共基础地址(通过远端 MCPHub 使用此进程时需要设置)。
CWA_WRITE_ENABLEDNo写入默认关闭。确认 CWA 上传权限、转换与重复处理设置后,再启用 CWA_WRITE_ENABLED=true。false

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_booksB

搜索书库与配置的书源。默认优先 CWA 中文、书源中文、CWA 其他、书源其他。partial 或 warnings 表示不能断言无结果;使用 next_cursor 继续。

acquire_bookA

start 用 request_id、candidate_id、required_format 创建持久任务。retry 只核对已提交任务,不重新上传。resolve 用 task_id/candidate_id 明确选择 CWA 匹配,提交后的元数据差异可通过重新搜索再选择解决,语言仍须一致。cancel 不删除 CWA 记录。

download_bookA

从显式选择的 Z 候选下载 EPUB/PDF 原文件并在 MCP 内校验。start 需要 request_id、candidate_id、required_format,默认 save_to_cwa:true,将同一文件自动交给 CWA;仅下载用 false。get_task.download.status 为 available 后可用 get_download_url 获取无需账号认证的书源链接,由 Agent 的 HTTP 工具保存并读取。collection 独立报告入库结果。collect 用 task_id 将未过期缓存补入 CWA;retry/cancel 使用 task_id。取票不明或链接过期不自动重新消耗额度。不交付 CWA 转换后的文件。

upload_bookA

prepare 用 request_id、title、filename、size_bytes、required_format 准备上传。文件真实元数据应与 title/authors/language 对应。按返回链接 PUT 完整文件;refresh_ticket 用 task_id 更新授权。禁止通过 MCP 传文件或任意服务端路径。

get_taskB

查询持久任务状态。ready 只表示 CWA 目标格式已验证;download_book 的 download.status:available 独立表示原文件已校验,可取链接,collection 报告入库进度。都不表示 Agent 已保存文件。needs_review 时选择 choices,已提交任务也可重新搜索 CWA 后 resolve。blocked 且有 waiting_for 时先处理关联任务;修复后用 retry 核对。

get_download_urlA

download_book 任务默认返回已在 MCP 内验证的书源原文件链接 delivery:source,无需客户端账号认证,可在 CWA 入库完成前获取;status:link_issued 仅表示链接提供,Agent 仍需 HTTP 保存并读取文件。重复取链接不重新取票,expires_at 为可识别的上游到期时间(未知为 null),available_until 同时受本地复用窗口与上游到期约束。其他任务默认返回需要 CWA Basic 认证的 OPDS 链接;delivery:gateway 显式取得限时签名 GET,需要可达的本程序文件入口。verification 仅记录服务端观察,无需客户端重复校验。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation3/5

download_book and acquire_book overlap heavily — both take request_id, candidate_id, and required_format to create persistent tasks, and both expose retry/cancel semantics, so an agent could easily misselect between fetching the raw original versus the CWA-matched/converted copy. get_download_url and get_task are related status/retrieval tools but are more clearly separated by their resource. The distinctions exist but require close reading of dense descriptions.

Naming Consistency5/5

All six tools follow a consistent verb_noun snake_case pattern: search_books, acquire_book, download_book, upload_book, get_task, get_download_url. The convention is predictable and uniform throughout, with no style mixing.

Tool Count5/5

Six tools is well-scoped for a book-acquisition and library-management server. Sub-operations (retry, cancel, resolve, collect, prepare, refresh_ticket) are folded into action parameters rather than exploding into separate tools, keeping the surface lean and each tool earning its place.

Completeness4/5

The surface covers the core lifecycle: search sources, create acquisition task, get status, retrieve download URL, download original, and upload. Some operations an agent might expect as first-class tools (delete/remove from library, update metadata, list library) are absent or only implied, but the main workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues