360 Secure SkillHub
360 安全技能中心

toui URL shortener

该 Skill 通过 toui MCP 工具或 REST API 将长链接缩短为短链接,可返回短链、短码和二维码地址,并可通过 REST 获取点击统计。REST 方式需 API 密钥;自定义短码、品牌域名和高级分析属于付费功能。

thebrecht
thebrecht
热度 25.12
最近更新 2026-06-12 11:19:33
分类:效率依赖:第三方 API / MCP 服务 / 代码执行应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add toui-shorten
Metadata
name
toui-shorten
description
Shorten URLs with toui.io and read their click stats. Use when the user wants to shorten a long URL, create a short link, make a tracking link, or check how many clicks a toui.io short code has received.
version
1.0.1
metadata
{"openclaw":{"primaryEnv":"TOUI_API_KEY","envVars":[{"name":"TOUI_API_KEY","required":false,"description":"toui API key (shorten scope) needed only for the direct REST path (curl). Create one at https://toui.io/admin. Not required if you connected via \"openclaw mcp add toui\" (OAuth)."}],"requires":{"anyBins":["curl"]},"emoji":"🔗","homepage":"https://toui.io","os":["darwin","linux"]}}

toui — URL shortener (toui.io)

Shorten long URLs with toui.io and read click stats. toui also runs a Telegram bot.

Two ways to use it

A. Via the toui MCP server (recommended, no API key)

If you're connected to toui's MCP server, just call the tool shorten_url:

shorten_url({ "url": "<url to shorten>", "title": "optional title" })

It returns { short_url, code, qr_url } — hand short_url back to the user.

One-time setup:

openclaw mcp add toui --url https://mcp.toui.io --transport streamable-http --auth oauth
openclaw mcp login toui

Note: the authorization code contains a colon. When copying code from the browser address bar, replace %3A back with : before running openclaw mcp login toui --code <code>.

B. Via the REST API (needs TOUI_API_KEY)

When not going through MCP, call the REST endpoint directly:

curl -X POST https://toui.io/api/v1/shorten \
  -H "Authorization: Bearer $TOUI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<url to shorten>","title":"optional"}'

Returns JSON with short_url and short_code. Create a shorten-scope key at https://toui.io/admin and set it as the TOUI_API_KEY environment variable.

Notes

  • Short links created under a logged-in account are permanent.
  • Click stats: the MCP tool only creates links (no stats); over REST use GET https://toui.io/api/v1/urls/{code}/stats (needs a full-scope key).
  • Custom short codes, branded domains, and advanced analytics are paid-plan features.