lanhu_download_asset
Download design assets (cutouts or icons) to local files, converting bitmaps to WebP, after obtaining download URLs from lanhu_get_assets. Returns the saved file path.
Instructions
下载指定的切图/图标到本地文件(位图默认自动转为 WebP 格式),返回保存路径。
需要先调用 lanhu_get_assets 获取资源的 download_url 等信息。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"asset_id": "<asset_id>",
"asset_name": "<asset_name>",
"download_url": "<download_url>"
},
"name": "lanhu_download_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | 文件格式:webp/svg/png(位图切图默认推荐 webp) | webp |
| asset_id | Yes | 资源 ID(从 lanhu_get_assets 获取) | |
| save_dir | No | 保存目录(可选,默认 ~/Downloads/lanhu_assets) | |
| asset_name | Yes | 资源名称,用作文件名 | |
| download_url | Yes | 下载链接(从 lanhu_get_assets 获取) |