check_document
Detect layout issues like text overflow, overlap, low contrast, and alignment errors in freeform documents, and optionally auto-fix them by resizing text and snapping positions.
Instructions
检查自由画布文档排出来的样子:在与导出相同的页面里排版后,逐页列出读者会注意到的问题——文字放不下、叠住、被挡住或跑出页面,对比度太低,还留着示例文字,图片没加载出来,图形、二维码、表格、图表画坏了,对齐差几 px,标题和正文拉不开层级,页面上一大片空白,该放图片的色块空着。每条带 kind、page、slideId、node(图层名)、path(apply_actions 用的节点路径)和改法,每种 kind 是什么意思见 get_guide("check")。fix: true 时把放不下的文字缩到能放下的字号、把差几 px 的对齐吸齐,并保存(用 documentId 时就地更新,返回 documentId 和 version),附改了哪些(fixed 是缩过的字号,snapped 是挪过的位置)和剩下的问题。文档怎么写见 dingcard://schema/freeform 资源或 get_guide("document-model")。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fix | No | 把放不下的文字缩到能放下的字号、把差几 px 的对齐吸齐(改动保存回这份文档,返回 documentId 和 version) | |
| document | No | 完整的 v44(或 v1–43 旧版)文档 JSON,可替代 documentId | |
| documentId | No | 创建或修改文档的工具返回的 documentId(推荐:不必来回传整份文档) | |
| documentPath | No | 文档 JSON 文件的路径,可替代 documentId | |
| includeDocument | No | 同时返回完整文档 JSON(默认只返回 documentId 和 version) |