Skip to main content
Glama

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

NameRequiredDescriptionDefault
fixNo把放不下的文字缩到能放下的字号、把差几 px 的对齐吸齐(改动保存回这份文档,返回 documentId 和 version)
documentNo完整的 v44(或 v1–43 旧版)文档 JSON,可替代 documentId
documentIdNo创建或修改文档的工具返回的 documentId(推荐:不必来回传整份文档)
documentPathNo文档 JSON 文件的路径,可替代 documentId
includeDocumentNo同时返回完整文档 JSON(默认只返回 documentId 和 version)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full load and does well: it discloses the returned issue shape (kind, page, slideId, node, path), the exact remediation fix:true performs (shrink overflow text, snap near-aligned elements), that changes are persisted in place, and the returned documentId/version plus fixed/snapped details. It stops short of stating whether the check itself is read-only without fix, or any permission/rate context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the issue taxonomy are front-loaded, and the fix/return behavior follows logically. The long enumeration of defect kinds is dense but each item contributes to recognition; it is slightly overlong for a single paragraph but not padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations, yet the description explains both the return shape and the fix-path return values, which is what an agent needs. The only real gap is the absence of guidance distinguishing this from validate_document/inspect_document/render_document.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so baseline is 3, but the description adds real meaning: fix's mutation-and-save behavior, in-place update via documentId returning documentId/version, and the fixed/snapped result semantics. The document/documentPath alternative sourcing is covered in schema but the fix consequences are not.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (check) and resource (freeform canvas document layout) and enumerates the exact defect classes it detects, so the agent knows precisely what comes back. It does not, however, distinguish itself from near-name siblings like validate_document, inspect_document, or render_document, which an agent would need to differentiate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the description (use it to find layout problems on a rendered document, set fix:true to repair), and it offers documentId/document/documentPath as input alternatives. But there is no explicit when-to-use-this-vs-validate_document/inspect_document routing, and no stated preconditions or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.