Skip to main content
Glama

render_markdown

Renders Markdown document envelopes into paginated card PNGs, applying platform headers, themes, web fonts, and automatic page breaks, then saves numbered images to the output directory.

Instructions

把 Markdown 文档信封无头渲染为一套卡片 PNG(与 Markdown 工作台导出同一管线:DOM 实测分页、平台头部与主题、网页字体按字符子集嵌入、逐页 pixelRatio 3 导出)。输出 -01.png、-02.png… 到 outputDir;页数由分页决定。 document 为 Markdown 文档信封:{ source: Markdown 文本(--- 为手动分页), platformId: 'rednote'|'weibo'|'twitter', themeId: 主题 id(如 'light'), fontFamily, radius: 数字圆角, profile: { nickname, handle, location, avatarColor, avatarImage: dataURL 或 null, verified, headerFirstPageOnly }, images?: { "img:": dataURL } }。

Input Schema

NameRequiredDescriptionDefault
baseNameNo输出文件名前缀,默认 "dingcard"
documentYesMarkdown 文档信封 JSON
previewsNo是否附上缩略图,默认 true
outputDirYesPNG 输出目录(不存在会创建)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose real behavior: file naming (<baseName>-01.png, -02.png…), page count driven entirely by pagination, non-existent outputDir being created, and default thumbnail previews. It says nothing about overwrite behavior, failure modes, permissions, or cost/latency of a headless render with font subsetting.

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?

Front-loaded with the action and output convention before the envelope spec, and every clause carries information. Some pipeline parentheticals (font subsetting, pixelRatio 3) are close to trivia for an agent's decision but do help set expectations about fidelity.

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 file-producing tool with no annotations and no output schema, the description covers output location, naming, page-count derivation, directory creation, and the full input envelope. Missing only secondary behavior: overwrite semantics, error reporting, and what the preview thumbnails actually contain.

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

Parameters5/5

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

Schema coverage is 100%, but the `document` parameter is effectively free-form JSON with no structure declared in the schema. The description compensates by enumerating the envelope: source (with '---' as manual page break), platformId values ('rednote'|'weibo'|'twitter'), themeId, fontFamily, radius, every profile field including avatarImage dataURL-or-null, and the images map keyed by 'img:<id>'. That is meaning well beyond the schema.

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 and resource: headlessly render a Markdown document envelope into a set of card PNGs, and pins the exact pipeline ('same as the Markdown workbench export: DOM-measured pagination, platform header/theme, subset-embedded web fonts, pixelRatio 3 per page'). It does not, however, distinguish itself from the sibling render_document, so an agent must guess which renderer applies.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use statement, and no sibling is named. Use is only implied by the requirement for a Markdown document envelope plus outputDir. The closest alternative, render_document, is left uncontrasted.

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