JMComic AI
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| add_favorite_albumA | 将本子加入当前登录账户的收藏夹,需要有效的登录会话或 Cookie。 本子已在收藏中时返回 error,且不会改变收藏状态。 参数: album_id: 本子 ID,也支持 JM 前缀或本子链接。 返回: status: "success" 或 "error"。 album_id: 本子 ID,成功解析后为纯数字字符串。 title: 本子标题,未能读取时为空字符串。 message: 上游结果消息或错误说明。 |
| browse_albumsA | 浏览、过滤、排行本子,支持灵活的分类、时间范围和排序选项。 该工具结合了分类浏览和排行榜功能,支持:
参数: category: 分类过滤器。可选值: - "all" 或 "0": 全部分类 - "doujin": 同人 - "single": 单本 - "short": 短篇 - "hanman": 韩漫 - "meiman": 美漫 - "doujin_cosplay": Cosplay - "3D": 3D - "another": 其他 - "english_site": 英文站 (默认值: "all") 返回: 包含以下内容的字典: - albums: 本子简要信息列表 (id, title, tags, cover_url) - total_count: 结果总数 - error: 如果参数无效,则包含错误信息(可选) 示例: # 1. 获取本月点赞排行 (月榜) browse_albums(time_range="month", order_by="likes") |
| browse_favorite_albumsA | 分页浏览已登录账户的收藏,返回轻量本子摘要。 参数: folder_id: 收藏夹 ID,"0" 表示全部收藏(默认值:"0")。 page: 页码,从 1 开始(默认值:1)。 order_by: 排序方式,favorite_time 按收藏时间、update_time 按更新时间 (默认值:favorite_time)。 username: HTML 客户端仅配置 Cookie 时必须提供用户名;通过 login 登录后可省略。 API 客户端忽略此参数,始终查询当前登录账户。 返回: albums: 本子摘要列表,包含 id、title、tags、cover_url。 total_count: 收藏总数。 page: 当前页码。 folder_id: 查询的收藏夹 ID。 error: 页码、收藏夹 ID 或排序参数无效时的错误信息(可选)。 |
| cancel_downloadA | 请求协作式取消共享任务目录中的后台下载,重复取消安全。 返回 cancel_requested/cancelling 表示已发信号,必须继续查询到终态;进行中的 HTTP 请求会先结束。 不删除已下载文件,最终结果保留完成项及 unfinished_ids,可用 retry_download 续下。 |
| delete_favorite_albumA | 取消当前登录账户对本子的收藏,需要有效的登录会话或 Cookie。 本子未在收藏中时返回 error,且不会改变收藏状态。 参数: album_id: 本子 ID,也支持 JM 前缀或本子链接。 返回: status: "success" 或 "error"。 album_id: 本子 ID,成功解析后为纯数字字符串。 title: 本子标题,未能读取时为空字符串。 message: 上游结果消息或错误说明。 |
| download_albumA | 在后台下载整个本子。 这是一个阻塞操作,会等待下载完成后返回。 下载进度会通过日志和 MCP Context(如果可用)实时报告。 参数: album_id: 要下载的本子 ID (例如 "123456") ctx: MCP Context,用于实时报告进度和日志(由 FastMCP 自动注入) 返回: 包含以下内容的字典: - status: "success" 或 "failed" - album_id: 本子 ID - title: 本子标题 - download_path: 下载目录的绝对路径 - duration: 下载调用总耗时(秒) - image_paths: 实际下载或命中缓存的图片绝对路径 - export_files: 下载插件生成的文件路径,按扩展名分组 - task_id: 本次 MCP 下载调用的任务 ID - log_path: 本次调用专属日志文件的绝对路径 - error: 如果失败则包含错误信息 |
| download_batchA | 有界批量下载并等待整批结果,支持 album/photo 和 zip/pdf/long_img 导出。 并发参数沿用 jmcomic JmSyncRuntime:album_workers=同时下载本子数(默认3,kind=album专用), photo_workers=全批章节数,image_workers=全批图片数;后两项默认沿用 download.threading.photo/image。 返回与 get_download_task 相同的结构:保序去重 items、unfinished_ids、failed_ids、 真实图片/导出路径、task_id/log_path/report_path。部分失败返回 partial,全部失败 failed。 items 的 id 保留请求编号,actual_id 是上游实际本子/章节编号;不同时向用户说明两者。 适合短批次;需要提前拿到 task_id、轮询及主动取消时使用 start_download。 MCP Context 自动注入,用于实时进度通知;调用方断开时协作取消并等待工作线程退出。 |
| download_coverA | 下载特定本子的封面图片。 默认保存到下载目录下的 'covers' 子目录,也可以指定输出目录。 参数: album_id: 本子 ID (例如 "123456") output_dir: 可选的封面输出目录;省略时使用默认的 'covers' 子目录。 返回: 包含保存路径的成功消息。 |
| download_photoA | 下载本子中的特定章节。 参数: photo_id: 要下载的章节 ID (例如 "123456") ctx: MCP Context,用于实时报告进度和日志(由 FastMCP 自动注入) 返回: 包含以下内容的字典: - status: "success" 或 "failed" - photo_id: 章节 ID - image_count: 下载的图片数量 - download_path: 下载目录的绝对路径 - duration: 下载调用总耗时(秒) - image_paths: 实际下载或命中缓存的图片绝对路径 - export_files: 下载插件生成的文件路径,按扩展名分组 - task_id: 本次 MCP 下载调用的任务 ID - log_path: 本次调用专属日志文件的绝对路径 - error: 如果失败则包含错误信息 |
| get_album_commentsA | 获取本子的一页评论,包括递归回评和剧透标识。 参数: album_id: 本子 ID (例如 "302820")。 page: 评论页码,从 1 开始(默认值:1)。 返回: 包含以下内容的字典: - album_id: 本子 ID - page: 当前页码 - page_size: 每页主评论数量 - total: 全部分页的主评论总数;不可用时为 null - page_count: 总页数;不可用时为 null - comment_count: 当前页主评论与所有层级回评总数 - comments: 评论列表,每条评论包含 replies 和 is_spoiler |
| get_album_detailB | 获取特定本子的详细信息。 参数: album_id: 本子 ID (例如 "123456") 返回: 包含详细信息的字典:id, title, author, likes, views, tags, actors, description, chapter_count, update_time, cover_url。 |
| get_download_taskA | 查询后台下载状态、已处理图片数及最终保序清单,或读取跨重启的任务报告。 状态 queued/running/cancel_requested/cancelling 为进行中,success/partial/failed/cancelled/interrupted 为终态。 items 的 success 表示整项完成;unfinished_ids 可用于 retry_download。 completed_images 包括缓存命中,不等于网络传输数。结果清单在整批收尾后确定。 |
| get_favorite_foldersA | 获取已登录账户的收藏夹目录。 参数: username: HTML 客户端仅配置 Cookie 时必须提供用户名;通过 login 登录后可省略。 API 客户端忽略此参数,始终查询当前登录账户。 返回: folders: 收藏夹列表,每项包含字符串 id 和 name;无收藏夹时为空列表。 查询全部收藏时使用 folder_id="0",该值不一定出现在目录中。 |
| get_forum_commentsA | 获取全站最新发布的一页评论,包括评论所属本子、递归回评和剧透标识。 参数: page: 评论页码,从 1 开始(默认值:1)。 返回: 包含当前页码、分页总数、评论数量和评论列表的字典。 HTML 客户端不提供 total 和 page_count,此时对应字段为 null。 |
| loginA | 登录 JMComic 账户以访问更多功能(如收藏夹、高级内容等)。 登录后的会话 Cookie 会自动保存,供后续请求使用。 参数: username: 用户名 password: 密码 返回: 登录成功或失败的消息。 |
| plan_downloadA | 下载前预览:规范化/去重 ID、输出根目录和全批并发上限,不下载图片。 kind 为 album 或 photo;export_formats 可选 zip/pdf/long_img。 album_workers 仅限制本子数(默认3);photo_workers 限制全批章节数,image_workers 限制全批图片数, 后两项默认沿用 download.threading.photo/image。参数沿用 jmcomic JmSyncRuntime 命名。 默认不请求漫画元数据或图片;配置的初始化插件仍按自身行为运行。include_details=True 联网读取标题、页数及章节 ID,便于选择部分章节, 单项失败记入 details,不中断其它项。目录仅为根目录,不估算文件大小或下载耗时。 PDF 缺少 img2pdf 时返回可操作错误,不自动安装依赖。 |
| post_processA | 对已下载的本子进行后处理(生成 Zip、PDF 或长图)。 参数:
album_id: 要处理的本子 ID。
process_type: 后处理类型,可选值为 "zip", "img2pdf", "long_img"。
params: 后处理参数字典。支持:
- 返回: 包含以下内容的字典: - status: "success" 或 "error" - process_type: 后处理类型 - album_id: 本子 ID - output_path: 输出文件/目录的绝对路径 - output_paths: 插件实际生成的全部文件绝对路径 - is_directory: 输出是否为目录 - message: 成功或错误消息 |
| retry_downloadA | 按原顺序为终态任务的未完成项创建新后台任务,保留原报告和任务 ID。 沿用原下载种类、并发和导出格式;采用当前配置/账户,已有图片由上游缓存复用。 不重复下载原任务已完成的本子;无未完成项或仍运行时返回 error。 |
| search_albumA | 搜索本子,支持高级过滤选项。 参数: keyword: 搜索关键词(支持本子ID、标题、作者、标签等)。 page: 页码,从1开始(默认值:1)。 main_tag: 搜索范围 - 0 (站内), 1 (作品), 2 (作者), 3 (标签), 4 (角色)(默认值:0)。 order_by: 排序方式,与 browse_albums 词汇一致。可选值: - "latest": 最新更新 - "likes": 最多点赞 - "views": 最多观看 - "pictures": 最多图片 - "score": 评分最高 - "comments": 评论最多 (默认值:"latest")。 time_range: 时间过滤,与 browse_albums 词汇一致。可选值: - "all": 全部时间 - "day" 或 "today": 今天 - "week": 本周 - "month": 本月 (默认值:"all")。 category: 分类过滤 - "all" 或具体的 CID(默认值:"all")。 返回: 包含以下内容的字典: - albums: 本子信息列表。 - total_count: 结果总数。 - error: 如果 order_by / time_range 参数无效,则包含错误信息(可选)。 |
| start_downloadA | 立即启动后台批量下载并返回 task_id、log_path、report_path。 ID/链接按首次出现顺序去重,kind=album/photo。 album_workers 限制全批同时下载的本子数,默认3,仅适用 kind=album; photo_workers 限制全批同时下载的章节数(也控制 kind=photo 批次); image_workers 限制全批同时下载的图片数。后两项默认沿用 download.threading.photo/image, 不修改配置、不做隐藏截断;所有参数均为正整数,命名沿用 jmcomic JmSyncRuntime。 全批共享图片/章节线程池;每个服务最多四批。export_formats 支持 zip/pdf/long_img, 下载时直接生成并返回真实产物路径,无需二次 post_process,不修改持久配置。 items 的 id 是请求编号,actual_id 是上游实际编号;不同时向用户说明两者。 随后用 get_download_task 查询,用 cancel_download 协作取消。任务由当前服务器持有, 关闭服务器会中断;报告可跨重启读取和重试。仅有 Skill/CLI 时用 jmai download --background。 |
| update_optionA | 更新 JMComic 配置并保存到文件。 重要提示:此工具仅执行有限的验证。 在调用此工具之前,建议先查看以下资源了解 JmOption 语法:
参数: option_updates: 要合并的配置更新字典。 支持对 client、download、dir_rule 等进行嵌套更新。 返回: 包含文件路径的成功消息,或错误消息。 示例: option_updates = { "client": {"impl": "api"}, "download": {"threading": {"image": 50}} } |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_option_schema | Return the JSON Schema for JmOption |
| get_option_reference | Return the option reference documentation |
| get_skill_doc | Return the SKILL.md for AI guidance |
TDQS
Scored across 21 tools
The download surface is crowded: download_album, download_batch, and start_download all 'download albums' and differ mainly by blocking vs. background semantics, so an agent must read carefully to pick correctly. Tools like plan_download/get_download_task/cancel_download/retry_download are distinct lifecycle stages, but the three download entry points create genuine overlap. Non-download tools (search, browse, detail, favorites, comments, config) are clearly separable.
Almost all tools follow a consistent snake_case verb_noun pattern (search_album, browse_albums, get_album_detail, add_favorite_album, download_cover), which is predictable. Minor deviations exist—'login' is a bare verb and 'post_process' lacks a noun object—but overall the convention holds.
At 21 tools this sits in the heavy range for a single-site comic client, and the seven download-related tools inflate the count beyond what most agents need. The breadth of domain features (search, browse, favorites, comments, downloads, config) partly justifies the size, but it is borderline heavy.
Coverage is strong: search, browse/ranking, album detail, comments (album and forum), favorites lifecycle (list folders, browse, add, delete), downloads, post-processing, and config all exist. Minor gaps remain—no dedicated chapter/photo metadata retrieval or user-profile tool—but core workflows are complete.