From 2009a59f96f3cedabcf9aa07123f6f09a3b30edd Mon Sep 17 00:00:00 2001 From: Helian Nuits Date: Wed, 25 Nov 2026 06:04:23 +0800 Subject: [PATCH 1/2] docs(mcp): clarify how to read effective control values Describe the empty group index, group-only specification, and group plus draft_id for effective values. Route text line spacing to layout, not photo guide calibration. No runtime or default changes. Actual stdio replies identical in 25 valid and 12 invalid cases. Native paired effective spacing reads use 5 -> 2 calls and 1 -> 0 errors; plain index control unchanged. --- crates/panache-mcp/README.md | 2 +- crates/panache-mcp/src/inputs.rs | 6 ++++-- crates/panache-mcp/src/main.rs | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/panache-mcp/README.md b/crates/panache-mcp/README.md index 78535f34..3c842601 100644 --- a/crates/panache-mcp/README.md +++ b/crates/panache-mcp/README.md @@ -58,7 +58,7 @@ cargo build --locked --release -p panache-mcp | `read_section` | `summary` 取版本、长度和样式;默认 `excerpt` 隐去正文中已识别的内嵌图片数据;`source` 读取精确 Markdown。后两种视图按字符分页,默认 1000 字,单次最多 4000 字。 | | `preview_handwriting` | 默认返回首页 PNG。用 `section`、`page` 查看指定节中的一页,两者从 1 开始。 | | `export_handwriting` | 按节顺序导出整份稿件,返回绝对路径、版本和实际页数。格式可选 `pdf` 或 `zip`,ZIP 从 `0.png` 开始编号。导出结果的 `review.unreviewed_pages` 按打印顺序列出缺少整页复盘的 `section`、`page`。将这些坐标与导出的版本号传给 `preview_handwriting(view="review")` 可逐张补看。 | -| `describe_controls` | 调参时可将参数直接放在 `changes` 内,也可写成 `{"changes":{"variation":{"perturb_theta_sigma":0.07}}}`。先列参数组,再按 `group` 查看单位、范围和枚举值。附上 `draft_id` 和 `revision` 可读取该版的实际值。 | +| `describe_controls` | 调参时可将参数直接放在 `changes` 内,也可写成 `{"changes":{"variation":{"perturb_theta_sigma":0.07}}}`。传 `{}` 列出参数组;只传 `group` 查看参数、单位、范围和枚举值。传 `group` 和 `draft_id` 读取当前保存版的实际值,另带 `revision` 可查指定版。行距和页面几何查 `layout`;底纸参考线校准不在该组。 | | `tune_handwriting` | 可在原稿上更新参考线、导入本机字体,并一次提交多项全稿参数,如 `{"ink_opacity":85,"word_spacing":2}`。`null` 恢复建稿时的设置。 | | `storage_usage` | 查询目录和逐稿用量,以及当前预算。 | | `plan_cleanup` | 按稿列出废弃临时文件和受保护的已交付导出。 | diff --git a/crates/panache-mcp/src/inputs.rs b/crates/panache-mcp/src/inputs.rs index d1c9a1f4..1d302775 100644 --- a/crates/panache-mcp/src/inputs.rs +++ b/crates/panache-mcp/src/inputs.rs @@ -102,10 +102,12 @@ pub struct Save { #[derive(Deserialize, JsonSchema)] #[serde(deny_unknown_fields)] pub struct Describe { - /// Optionally include this draft's effective values for the selected group. + /// Pass with group to read this saved draft's effective values. pub draft_id: Option, + /// Requires draft_id and group. Omit to read the latest saved revision. pub revision: Option, - /// Omit for group names. Supply a group to get field names, units and ranges. + /// Use {} to list group names, or group alone for its fields, units, ranges and choices. + /// Use "layout" for line spacing and page geometry, not paper guide calibration. pub group: Option, } diff --git a/crates/panache-mcp/src/main.rs b/crates/panache-mcp/src/main.rs index fe797d7b..c18499a1 100644 --- a/crates/panache-mcp/src/main.rs +++ b/crates/panache-mcp/src/main.rs @@ -283,7 +283,7 @@ impl ServerHandler for Panache { impl Panache { #[tool( annotations(read_only_hint = true, open_world_hint = false), - description = "For less even handwriting, inspect group=variation; for requested occasional crossed-out mistakes, group=strike. Pass draft_id to read current values before tune_handwriting. Omit group for the index." + description = "Call describe_controls({}) to list group names. Pass group alone for its fields, units, ranges and choices. Pass group and draft_id for the saved draft's effective values; add revision to read an older version. Use group=layout for line spacing and page geometry, not paper guide calibration. For less even handwriting inspect group=variation; for requested occasional crossed-out mistakes inspect group=strike." )] fn describe_controls(&self, Parameters(input): Parameters) -> CallToolResult { tool_result((|| { From 7d37c230f9417e7c0403ed5beedbd3746edbbd3e Mon Sep 17 00:00:00 2001 From: Helian Nuits Date: Wed, 25 Nov 2026 10:45:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs(panache-mcp):=20=E5=90=88=E5=86=99?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=9B=AE=E5=BD=95=E5=92=8C=E8=A5=BF=E6=96=87?= =?UTF-8?q?=E6=8E=92=E7=89=88=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 背景: #26 与 #44 改写同一条目录说明,直接择一会漏掉查询形状或西文排版入口。 解决手段: 在同一条 `describe_controls` 说明里保留查询形式、有效值、文字间距与参考线的区别,以及西文字体、比例和数字设置的入口。 收益: 模型可以先查稿件实际值再调参,不需要猜组或把文字行距当底纸校准。运行时行为保持不变。 --- crates/panache-mcp/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/panache-mcp/src/main.rs b/crates/panache-mcp/src/main.rs index c18499a1..d79c6a97 100644 --- a/crates/panache-mcp/src/main.rs +++ b/crates/panache-mcp/src/main.rs @@ -283,7 +283,7 @@ impl ServerHandler for Panache { impl Panache { #[tool( annotations(read_only_hint = true, open_world_hint = false), - description = "Call describe_controls({}) to list group names. Pass group alone for its fields, units, ranges and choices. Pass group and draft_id for the saved draft's effective values; add revision to read an older version. Use group=layout for line spacing and page geometry, not paper guide calibration. For less even handwriting inspect group=variation; for requested occasional crossed-out mistakes inspect group=strike." + description = "Call describe_controls({}) to list group names. Pass group alone for its fields, units, ranges and choices. Pass group and draft_id for effective values from the latest saved revision, or include revision to select a version. Use group=layout for text line spacing and page geometry. Use paper_guides to calibrate physical lines on imported paper. Use group=variation for less even handwriting and group=strike for requested occasional crossed-out mistakes. When English letters or digits need separate tuning, use group=typography with draft_id to check the saved font, scale and digit settings before changing them." )] fn describe_controls(&self, Parameters(input): Parameters) -> CallToolResult { tool_result((|| {