Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/panache-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` | 按稿列出废弃临时文件和受保护的已交付导出。 |
Expand Down
6 changes: 4 additions & 2 deletions crates/panache-mcp/src/inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
/// Requires draft_id and group. Omit to read the latest saved revision.
pub revision: Option<u32>,
/// 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<String>,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/panache-mcp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 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<Describe>) -> CallToolResult {
tool_result((|| {
Expand Down