Skip to main content

qwen-mm-plugins-example

Example/template capability — a minimal MCP server whose demo tools (echo, make_swatch, make_film_strip, describe, config_probe) show how a Qwen-MM-Plugins capability is structured: the content-return shapes, calling an API, reading env/config, and composing other capabilities. Use it as the starting point when adding a new capability.

来源信息

仓库
QwenLM/Qwen-MM-Plugins
最近来源活动
2026年8月3日 12:31
检测到的 SKILL.md 语言
英语
星标
3,135
分支
209

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
qwen-mm-plugins-example
description
Example/template capability — a minimal MCP server whose demo tools (echo, make_swatch, make_film_strip, describe, config_probe) show how a Qwen-MM-Plugins capability is structured: the content-return shapes, calling an API, reading env/config, and composing other capabilities. Use it as the starting point when adding a new capability.
# Example Capability (template) A minimal reference capability. To start a new one, copy `capabilities/example/` and adapt it — see the repo's *how to add a new capability* doc for the full walkthrough. You have the `qwen-mm-plugins-example` MCP tools available: - **echo** — return text (a text-only tool). - **make_swatch** — generate a solid-color image (an image return, built with `shared.content.image`). - **make_film_strip** — generate N frames as images (the multi-frame / video pattern). - **describe** — ask an OpenAI-compatible chat model, optionally about a local image (an API-calling tool; pass `dry_run=true` to see the request without a key or network). - **config_probe** — report how config resolves via `shared.env.get_env` (env / config / default). Check the tools in your tool list for full schemas. They exist to demonstrate the building blocks a real capability uses — content-return shapes, an API call, and env/config access. ## Environment & config Config is read via **`shared.env.get_env(name, default)`**, with precedence **environment variable > `~/.qwen-mm-plugins/config` > default**. For example, `describe` gets `DASHSCOPE_API_KEY` this way (through `resolve_openai_endpoint`), and `config_probe` reads the demo tunable `QWEN_MM_EXAMPLE_GREETING`. Run **config_probe** to see what currently resolves. MCP-server code imports `get_env` from `shared.env` directly. **Skill-side helper scripts run detached and cannot import `shared`** — so if your skill ships its own scripts, copy the tiny `env_config.py` mirror (see `video-memory` / `edu-agent`) to get the same precedence. ## Composing other capabilities (dependencies) A capability should reuse other capabilities rather than reimplement them. This template has **no media reader of its own**, so: - If the user gives a **video**, first call **`read_video`** from **`qwen-mm-plugins-core`** to extract frames, then feed a frame path to `describe` (to caption it) or `make_swatch`. - If the user gives a **document / PDF / 3D model**, use `qwen-mm-plugins-core`'s reading tools the same way before doing example-specific work. When your capability depends on another, say so here and name the exact tool to call — that is how a skill tells the model to compose plugins instead of guessing.
在 GitHub 查看