Skip to main content
Glama

add_template_pages

Add specific pages from multi-page templates or a single poster layout to a free-canvas document, preserving each page's size and sample text for later editing.

Instructions

把模板的页面加进一份自由画布文档,和编辑器模板面板里点一页一样:套图模板可以只加某几页(再来一张内页、换个结尾页),单页海报加进来就是新的一页。页面保留模板自己的尺寸和示例文字,之后用 inspect_document 找到图层、apply_actions 改字,check_document 会把没改的示例文字报出来。要直接按内容填好:套图的页用 create_document_from_content 每页的 templateId,海报用 create_poster_from_content 的 documentId。返回加进来的页(slideId、名称、在文档里是第几页),默认附上这些页的缩略图。

Input Schema

NameRequiredDescriptionDefault
pagesNo加模板的第几页,从 1 起(套图是 1 封面、2 内页、3 结尾),可以重复;不给就加全部
documentNo完整的 v44(或 v1–43 旧版)文档 JSON,可替代 documentId
previewsNo是否附上加进来的页的缩略图,默认 true
documentIdNo创建或修改文档的工具返回的 documentId(推荐:不必来回传整份文档)
templateIdYeslist_templates 返回的自由画布模板 id
afterSlideIdNo加在这一页后面;不给就加在最后
documentPathNo文档 JSON 文件的路径,可替代 documentId
replaceSlideIdNo换掉这一页(比如一张空白页),不能和 afterSlideId 同时给
includeDocumentNo同时返回完整文档 JSON(默认只返回 documentId 和 version)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 burden and does well: it discloses that pages keep the template's own size and sample text, that check_document will flag unedited placeholders, and what the return payload contains plus the default thumbnail behavior. It does not state whether replaceSlideId is destructive/irreversible or what happens to existing content when a slide is swapped.

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?

The core action is front-loaded in the first clause, and each subsequent sentence adds workflow, alternatives, or return-shape value. It is dense and long for a single description, with some overlapping coverage of the two creation alternatives, but little is pure filler.

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?

For a 9-parameter mutation tool with no annotations and no output schema, the description covers the return values (slideId, name, page position), the thumbnail default, and the editing workflow. The main residual gap is the absence of any warning about replaceSlideId replacing existing content, which matters for safe invocation.

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 description coverage is 100%, so the baseline is 3; the schema already explains pages, templateId, previews, afterSlideId/replaceSlideId mutual exclusion, and document alternatives. The description adds the useful framing that 'pages' maps to real template structure and that this is the manual counterpart to the content-filling tools, but adds no syntax or format detail beyond the schema.

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

Purpose5/5

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

States a specific verb and resource ('把模板的页面加进一份自由画布文档') and immediately analogizes to clicking a page in the editor template panel, covering both multi-page and single-page poster cases. It names the sibling tools that serve adjacent needs, so an agent can distinguish it without opening a schema.

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

Usage Guidelines5/5

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

Explicit alternatives with conditions: use create_document_from_content with per-page templateId for content-filled multi-page docs, and create_poster_from_content's documentId for posters. It also lays out the correct follow-up workflow (inspect_document → apply_actions → check_document) for editing sample text.

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