ESQ Builder

v0.1.4
io.github.mo9652962-ai/esq-builder-mcp Checked 4 days ago Published 2 months ago

ESQ 1.0 题库包工具链(墨题刷题机):build(auto_fix) → validate(双轨校验) → upload/publish + kajweb 词表解析与热点词统计

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

esq_build_package Esq Build Package

校验并构建 ESQ 1.0 题库包 ZIP。

ParameterTypeDescription
answers *object{paperKey: {questionKey: {correctOption:"B", score: 2}}} —— 每空必填, correctOption 必须存在于该题选项
manifest *object{packageId, contentVersion, title, subject, publisher, license:{notice}, source:{description}}
output_path *string输出 ZIP 绝对路径
papers *array[{paperKey, year, units:[{unitKey, type(cloze|reading|part_b), title, sequence, passage?, candidates?, questions:[...]}]}] - cloze: passage.blocks[].text 用 {{blank:N}} 双花括号标记空位(不…
auto_fixbooleantrue 时先自动修复机械性坑再构建——含中文的 externalKey 重建为 cn.xxx.y2021.u1 风格(answers 键同步改名)、单花括号 {blank:N} 转双花括号、 缺失 sequence 补…

esq_validate_package Esq Validate Package

校验 ESQ 包(默认内置校验器, 与刷题机官方 esq.py 同规则)。

ParameterTypeDescription
zip_path *stringESQ 包路径
validator_path可选, 指定后改用官方校验器 CLI(backend/tools/validate_question_bank.py) subprocess 对账——默认内置实现已与其保持一致并由一致性测试守护

esq_upload_and_publish Esq Upload And Publish

上传 ESQ 包到刷题机后端并(可选)发布。上传前先 esq_validate_package。

ParameterTypeDescription
zip_path *stringESQ 包路径
base_urlstring后端地址(默认 http://127.0.0.1:8765, 需先启动后端)
profile_id题库 profile(不传则用后端当前激活级别)
publishboolean是否发布(默认 true)

esq_parse_wordlist Esq Parse Wordlist

解析 kajweb/dict 高频词表 JSONL(wordRank=真题词频排序)。

ParameterTypeDescription
jsonl_path *stringkajweb book/*.zip 解压后的 JSONL 文件路径
level标注级别名(如 "四级·高频")
top_n只取前 N 个(如四级核心词取 1162)

esq_hot_words Esq Hot Words

真题 passage 文本 → 热点词频统计(去停用词, [a-zA-Z][a-zA-Z'-]{3,})。

ParameterTypeDescription
texts *array[{year: 2024, text: "passage 正文"}, ...](或纯字符串列表)
extra_stopwords额外停用词
since_yearinteger只统计该年份之后的真题(默认 2023, 即"近两年热点")
top_ninteger取前 N 个(默认 300)