Skip to main content
Glama

mobile_preview

Package the current project and upload it to Douyin's preview service, returning a QR code and expiration time so you can scan with the Douyin App to view the effect on a real device.

Instructions

手机预览:按工具栏「手机预览」的方式打包当前工程并上传到抖音的预览服务,返回和编辑器弹出的一样的二维码图片(及其文本、有效期),用抖音 App 扫码即可在真机上看效果。二维码同时存成文件 qr_file,可直接给用户扫,不要另存到别处:到期(expires_at,一般 7 天)后自动删除。会把特效包上传到抖音服务器;内容审核不通过时报 MOBILE_PREVIEW_MODERATION_FAILED。

Input Schema

NameRequiredDescriptionDefault
instance_idNo官方 list_instances 返回的 instance_id,与 project_path 二选一。
project_pathNo目标工程的绝对路径。与 instance_id 二选一;只开了一个工程窗口时都可省略。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses the network side effect (uploading the effect package to Douyin servers), the possible moderation failure with the exact error code MOBILE_PREVIEW_MODERATION_FAILED, and the lifecycle of the generated qr_file (auto-deleted at expires_at, typically 7 days). This is behavior that could not be inferred from the schema.

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 core action and then the return artifacts, side effects, and error code in a logical order. It is dense but nearly every clause carries operational value; a slight trim of redundant phrasing about the QR file would make it tighter.

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?

Although there is no output schema, the description explains the return payload (QR image, its text, validity period, qr_file), the storage location and expiry, and the failure mode. For a two-optional-parameter tool, an agent has everything needed to call it and report results correctly.

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%, and each parameter already documents its mutual-exclusion rule (instance_id vs project_path, both omittable when only one window is open). The description adds nothing about the parameters, so the baseline 3 applies — the schema does all the work here.

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?

Names a concrete verb+resource pair: packages the current project the way the toolbar's "手机预览" does, uploads it, and returns a QR code. The comparison to the editor toolbar action plus the explicit return artifacts (QR image, its text, expiry) makes the purpose unmistakable and separates it from generic preview siblings like preview_frames.

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?

Gives a clear usage context — scan the QR with the Douyin app to check the effect on a real device — and implicitly anchors the tool to the equivalent toolbar action. It stops short of explicitly contrasting with alternatives such as preview_frames or submit_prepare, so the agent must infer when not to use it.

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