Skip to main content
Glama

share_document

Render documents as images and generate a login-free DingCard share link with QR code so users can view or save cards on mobile; list or revoke shares.

Instructions

把文档渲染成图片、上传到部署的叮卡服务端,生成一个不用登录就能打开的分享链接:手机扫码或点链接就能看整套卡片、长按存图——「电脑做图、手机发图」的最后一公里。自由画布文档(documentId 或 v44 文档)和 Markdown 卡片信封(source、platformId、themeId 等,与 render_markdown 的 document 相同)都可以。返回 { ok, share: { id, url, expiresAt, imageCount } } 并附上二维码图片,给用户扫即可。expiresInHours 是有效期(小时,1–720,默认 24,最长一个月),过期后链接打不开、图片仍留在账号里。action 另选 list(列出账号已有的分享)、revoke(按 id 撤销:链接立刻打不开、图片等回收清理)。需要环境变量 DINGCARD_SERVER_URL(部署的服务端地址)和账号或令牌环境变量。

Input Schema

NameRequiredDescriptionDefault
idNorevoke:要撤销的分享 id(list 里查)
qrNo是否附上二维码图片,默认 true
titleNo分享页标题,默认「叮卡分享」
actionNoshare 分享(默认)、list 列出已有分享、revoke 撤销一个
documentNo完整的 v44(或 v1–43 旧版)文档 JSON,可替代 documentId
documentIdNo创建或修改文档的工具返回的 documentId(推荐:不必来回传整份文档)
documentPathNo文档 JSON 文件的路径,可替代 documentId
expiresInHoursNo链接有效期(小时),1–720,默认 24,最长一个月

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 weight and does well: it discloses that this is a network upload to a deployed server, that links expire and become unusable while images stay in the account, and that revoke breaks the link immediately with images reclaimed later. Required environment variables (DINGCARD_SERVER_URL plus account/token) are called out. Authentication details and error behavior are left vague.

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 output contract and QR behavior are front-loaded and the mode and expiry semantics follow in a sensible order. It is dense and sentence-long but nearly every clause carries information. Slight redundancy with the schema on expiresInHours and the document parameter shapes.

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 an 8-parameter, zero-required tool with no output schema, the description supplies the return shape ({ ok, share: { id, url, expiresAt, imageCount } } plus QR image) and the environment prerequisites, which is what an agent needs. It does not say what happens when no document source is supplied for the share action, a small gap.

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 100%, so baseline is 3, but the description adds real meaning beyond the schema: it explains that documentId, document, and documentPath are interchangeable routes to the same input and that the Markdown envelope matches render_markdown's document. expiresInHours bounds and default are repeated from the schema rather than extended, so it is not a 5.

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?

The description names a concrete workflow with a specific verb chain: render the document as images, upload to the deployed DingCard server, and produce a login-free share link. It also scopes the accepted inputs (free-canvas documentId / v44 document vs. a Markdown card envelope) and distinguishes itself from render_markdown by referencing the same document shape. An agent can tell it apart from render_document at a glance.

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?

It explains the three action modes clearly: share is the default, list enumerates existing shares, and revoke tears down a share by id. It also gives the practical use case (creating on desktop, sending from phone) and notes expiry semantics. It never explicitly states when to prefer a sibling like render_document instead, which keeps it below 5.

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