Skip to main content
Glama

inspect_document

Review document structure, node IDs, page geometry, colors, fonts, and text sizes before editing to target layout changes accurately.

Instructions

检查文档结构:页面摘要(尺寸/背景/节点数)与递归节点树(id、name、type、几何、文本摘要;内置图标标出 icon id,装饰素材标出 decoration id,组成装饰的组也标在组上),以及整套卡片的 style:用到的颜色(按占的面积排序,附 share 和用在 background/fill/text/line/shadow 哪些地方)、字体(texts 用了几段文字、largest 最大字号)和正文字号 bodySize。改文档前先 inspect,拿到节点 id / 路径再发动作。文档怎么写见 dingcard://schema/freeform 资源或 get_guide("document-model")。

Input Schema

NameRequiredDescriptionDefault
documentNo完整的 v44(或 v1–43 旧版)文档 JSON,可替代 documentId
documentIdNo创建或修改文档的工具返回的 documentId(推荐:不必来回传整份文档)
documentPathNo文档 JSON 文件的路径,可替代 documentId

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description bears the full burden. It strongly implies a read-only operation and details the return shape, but never states outright that the document is never modified, how behavior differs across the three input modes, or what happens on malformed/legacy documents. Adequate, but not complete for an unannotated tool.

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 is front-loaded, followed by guidance and a resource pointer; every part of the long enumeration maps to a returned field. The single mid-section sentence is dense with parenthetical detail, but that detail has nowhere else to live without an output schema.

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

Completeness5/5

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

With no output schema and no annotations, the description does the necessary work by enumerating the returned structure field by field and routing to dingcard://schema/freeform and get_guide('document-model') for the separate question of document authoring.

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

Parameters3/5

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

Schema coverage is 100%, so document/documentId/documentPath are already explained structurally, which is the baseline-3 case. The description adds nothing about the tradeoffs between passing a full document versus a documentId, even though the schema itself recommends documentId.

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?

The description names a specific verb and resource ('检查文档结构') and enumerates exactly what is returned: page summary, recursive node tree, icon/decoration ids, and a style rollup. An agent knows precisely what this produces, but it never distinguishes itself from the similar-looking siblings get_document, check_document, and validate_document by name.

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

Usage Guidelines4/5

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

'改文档前先 inspect,拿到节点 id / 路径再发动作' gives an explicit ordering rule: inspect before mutating, use the returned ids/paths for actions. What's missing is any exclusion or contrast with the other read-style siblings, so the agent isn't told when get_document or check_document would be the better choice.

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