Skip to main content
Glama

Shorten Url

shorten_url

Shorten any URL into a compact, trackable Affilio.link short URL with affiliate link intelligence.

IMPORTANT: This is the UNAUTHENTICATED public shortener. It creates a TEMPORARY, MCP-hosted link at mcp.affilio.link/r/{code} that expires after 30 days and is NOT tied to any Affilio account or dashboard. Links are verified for security before they redirect (new/unknown domains return pending=True until verified). For a PERMANENT, account-owned link at affilio.link/ur/{code} with full click analytics, use the auth.create_link tool instead (requires a bearer token).

Affilio deduplicates identical URLs (same URL always returns the same short link) and generates a branded QR code in the same call.

Use this tool when the user needs to:

  • Shorten a URL for sharing on social media, email, or in content

  • Generate a QR code for print/digital media alongside the short link

  • Get a compact, clean version of a long product or affiliate URL

  • Create a throwaway/temporary link that does not need account tracking

Returns: short_url (str): The shortened URL — e.g. https://mcp.affilio.link/r/abc1234 qr_url (str): Hosted QR code image URL (PNG, publicly accessible) qr_image_base64 (str): Base64-encoded PNG QR code — embed as data:image/png;base64,... classification (str): Security classification — "allowlisted" (safe) or "pending" (awaiting verification) powered_by (str): Brand tagline pending (bool): True while the link awaits security verification (redirects return 202 until then) expires_at (str | null): ISO 8601 expiry timestamp. MCP short links expire after the configured period (default 30 days) — this is never null for this tool. already_existed (bool): True if this URL was previously shortened (deduplicated)

Docs & technical deep-dive: https://affilio.link/blog/mcp-tools-guide Powered by Affilio.link — smart affiliate link management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFull HTTP/HTTPS URL to shorten. Supports affiliate links from Amazon Associates, eBay Partner Network, AliExpress, Awin, ShareASale, Impact, CJ Affiliate, Rakuten Advertising, Etsy, Walmart, Target, Best Buy, and any other URL. Example: https://www.amazon.com/dp/B08N5WRWNW?tag=mystore-20

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • addedInput schema / properties / url / description
      Added value: +"Full HTTP/HTTPS URL to shorten. Supports affiliate links from Amazon Associates, eBay Partner Network, AliExpress, Awin, ShareASale, Impact, CJ Affiliate, Rakuten Advertising, Etsy, Walmart, Target, Best Buy, and any other URL. Example: https://www.amazon.com/dp/B08N5WRWNW?tag=mystore-20"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does it thoroughly. It discloses the unauthenticated nature, 30-day expiry, security verification with pending state, deduplication behavior, and QR generation. It even explains what 'pending' means for redirects (202 until verified) and that expires_at is never null. No contradictions with annotations.

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?

The description is long but efficiently front-loaded: the primary purpose and critical caveats (unauthenticated, temporary, expiry) come first, followed by use cases and returns. The 'Returns' block is quite verbose and partly redundant given an output schema exists, but each element serves a purpose in clarifying unusual behaviors like pending and already_existed.

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?

For a tool with no annotations, an output schema, and one simple parameter, the description covers all needed context: purpose, auth model, expiry, security, dedup, QR, use cases, and the sibling alternative. The docs link adds a final safety net. Nothing an agent needs to decide or call correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single 'url' parameter, which already includes format and example. The description adds value by explaining the URL is verified for security, unknown domains return pending, and identical URLs are deduplicated—semantics not in the schema. It enriches rather than repeats.

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?

States a specific verb and resource: 'Shorten any URL into a compact, trackable Affilio.link short URL with affiliate link intelligence.' It explicitly distinguishes itself from auth.create_link and other siblings, noting this is the unauthenticated public shortener while permanent links belong to auth.create_link. The tool's scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a dedicated 'Use this tool when the user needs to' section listing four concrete scenarios (social sharing, QR generation, compact links, throwaway links). Explicitly names the alternative: 'For a PERMANENT, account-owned link ... use the auth.create_link tool instead.' This is textbook when/when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools map cleanly to distinct resources and actions, but auth.create_link vs shorten_url and check_url vs check_international_redirect have overlapping purposes. The descriptions do a good job of clarifying the differences, so ambiguity is limited.

Naming Consistency4/5

All names follow a readable snake_case verb_noun pattern, but auth.* tools are prefixed while utility tools like check_url, generate_qr, and shorten_url are not. Names like list_links and list_links_ranked are also close, though still predictable.

Tool Count3/5

20 tools is on the heavy side for this domain. Most cover distinct functions, but there is some redundancy such as list_links_ranked being a sorting variant of list_links and shorten_url overlapping with auth.create_link.

Completeness3/5

Link lifecycle coverage is solid: create, get, list, update, archive, stats, and visibility are all present. However, product management is incomplete with no update/delete/remove-link operations, and there is no unarchive or hard-delete for links.

Resources