Shorten a link
shorten_linkTurn a long web address into a short snip.link link, free, and get a QR code for it. Use this when the user wants a short link, a link they can change after printing, click and scan counts, or a YouTube, Spotify or Amazon link that opens the app when tapped inside Instagram, TikTok or Facebook (every Snip.link link does that on its own). When the user is not signed in to Snip.link the link works at once and the answer includes a claim link the user can open to keep it in a free Snip.link account and see its clicks. When they are signed in (the account endpoint or an API key) the link is saved to their account, and a custom ending (go.snip.link/your-ending) is allowed.
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": {
"url": "<url>"
},
"name": "shorten_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The http or https address to shorten. | |
| title | No | A name for the link in the user's dashboard. Needs the user signed in to Snip.link. | |
| track | No | Override the default for visit tracking. | |
| domain | No | One of the user's own live domains (go.yourbrand.com, see list_domains) to put the link on instead of snip.link. Needs the user signed in on a plan with own domains. | |
| ending | No | Custom ending for go.snip.link/<ending>, also available at snip.link/r/<ending>: 3 to 40 ASCII letters, digits, dashes or underscores, with no spaces. Free with a Snip.link account. Omit or send an empty string for a random code. | |
| routes | No | Rules that send some visits elsewhere, tried in order; the first match wins and everyone else goes to url. Free with a Snip.link account. Each rule: conditions joined by when (all or any) and its own url. Condition kinds: device (values mobile, tablet, desktop), os (ios, android, windows, macos, linux, chromeos), browser (chrome, safari, firefox, edge, samsung, opera, instagram, facebook, tiktok), country (ISO codes like US), region (US-CA), language (en, es), time (from and to as HH:MM, tz an IANA zone or "visitor"), weekday (values 0 Sunday to 6, tz), dates (from and/or to as 2026-11-01 or 2026-11-01T09:00, tz), via (value qr or link), referrer (sites like instagram.com), query (param, optional value), split (percent 1 to 99; neighbouring splits share visitors, so 50 then 50 is an A/B test). Any condition but split takes negate true. A rule with action off and no url switches the link off for matching visits instead (a time window, a country): they see a "not available right now" page and are not counted. An empty list removes every rule. | |
| presets | No | Owned Library ids, one per kind. Omit for account defaults; [] skips Library defaults. Explicit link settings win. | |
| preview | No | Social preview; null clears a Library preview. | |
| qr_style | No | QR settings; null clears a Library QR style. | |
| snapshots | No | ||
| stats_public | No | Whether aggregate stats are public. Explicit false overrides a saved template. | |
| forward_query | No | Override query-parameter forwarding. | |
| expires_in_days | No | Expiry from creation; null means no expiry. |