Skip to main content
Glama

短.在线

Shorten URL · 缩短链接(短.在线)

shorten_url
Idempotent

创建一个 HTTP 或 HTTPS 短链。需要已注册账户。返回状态;链接为 active 时返回 Unicode 显示地址和 ASCII 地址。两条及以上请用 shorten_urls。重试同一操作须复用同一个 idempotency_key。 Create one HTTP or HTTPS short link. A registered account is required. Returns the state, and when active, the Unicode display URL and the ASCII URL. For two or more, use shorten_urls. A retry of the same operation must reuse the same idempotency_key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesDestination HTTPS/HTTP URL to shorten. Required. Do not send longUrl.
aliasNoOptional custom path segment (stored lowercase). Do not send customSlug.
titleNoOptional link title, at most 256 characters.
localeNoAPI language preference. Canonical values: en and zh-CN. Documented aliases normalized to the canonical value: zh-cn, zh-Hans, zh-hans, zh_Hans, zh_hans. Traditional Chinese is not supported. EN, ZH-CN, and bare zh are rejected. Omitted or blank defaults to en. This preference does not rewrite URL bytes, translate parameter names, or use the caller's location. Website routes stay /zh-cn.
idempotency_keyYesClient-generated unique key for this create. Required. Replays within 24h.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • addedOutput schema / oneOf
      Added value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "created_at": {
      +        "type": "string"
      +      },
      +      "destination": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "qr_tracking_url": {
      +        "type": "string"
      +      },
      +      "qr_url": {
      +        "type": "string"
      +      },
      +      "request_id": {
      +        "type": "string"
      +      },
      +      "short_url": {
      +        "type": "string"
      +      },
      +      "short_url_ascii": {
      +        "type": "string"
      +      },
      +      "state": {
      +        "const": "active",
      +        "type": "string"
      +      },
      +      "status_url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "request_id",
      +      "id",
      +      "state",
      +      "short_url",
      +      "short_url_ascii",
      +      "destination",
      +      "qr_tracking_url",
      +      "qr_url",
      +      "created_at",
      +      "status_url"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "created_at": {
      +        "type": "string"
      +      },
      +      "error": {
      +        "const": "LINK_QUARANTINED",
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "request_id": {
      +        "type": "string"
      +      },
      +      "state": {
      +        "const": "quarantined",
      +        "type": "string"
      +      },
      +      "status_url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "request_id",
      +      "id",
      +      "state",
      +      "created_at",
      +      "status_url",
      +      "error",
      +      "message"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "code": {
      +        "type": "string"
      +      },
      +      "error": {
      +        "type": "string"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": false,
      +        "type": "boolean"
      +      },
      +      "request_id": {
      +        "type": "string"
      +      },
      +      "resend_path": {
      +        "description": "Where to resend the verification email when verification would raise this account's limits.",
      +        "type": "string"
      +      },
      +      "retryable": {
      +        "type": "boolean"
      +      },
      +      "title": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "request_id",
      +      "error",
      +      "code",
      +      "message",
      +      "type",
      +      "title",
      +      "retryable"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "ok": {
      +        "const": true,
      +        "type": "boolean"
      +      },
      +      "replay": {},
      +      "request_id": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "request_id",
      +      "replay"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties
      Removed value: -{
      -  "code": {
      -    "type": "string"
      -  },
      -  "created_at": {
      -    "type": "string"
      -  },
      -  "destination": {
      -    "type": "string"
      -  },
      -  "error": {
      -    "type": "string"
      -  },
      -  "id": {
      -    "type": "string"
      -  },
      -  "message": {
      -    "type": "string"
      -  },
      -  "ok": {
      -    "type": "boolean"
      -  },
      -  "qr_tracking_url": {
      -    "type": "string"
      -  },
      -  "qr_url": {
      -    "type": "string"
      -  },
      -  "request_id": {
      -    "type": "string"
      -  },
      -  "resend_path": {
      -    "description": "Where to resend the verification email when verification would raise this account's limits.",
      -    "type": "string"
      -  },
      -  "retryable": {
      -    "type": "boolean"
      -  },
      -  "short_url": {
      -    "type": "string"
      -  },
      -  "short_url_ascii": {
      -    "type": "string"
      -  },
      -  "state": {
      -    "type": "string"
      -  },
      -  "status_url": {
      -    "type": "string"
      -  },
      -  "title": {
      -    "type": "string"
      -  },
      -  "type": {
      -    "type": "string"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok",
      -  "request_id"
      -]
  2. Changed4 schema fields changed
    • addedOutput schema / properties / qr_url
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / resend_path
      Added value: +{
      +  "description": "Where to resend the verification email when verification would raise this account's limits.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / title
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / type
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / locale / description
      Previous value: -"Accepted values: en, zh-CN, and zh-cn (the only case fold of zh-CN). EN, ZH-CN, and bare zh are rejected. Omitted or blank defaults to en."New value: +"API language preference. Canonical values: en and zh-CN. Documented aliases normalized to the canonical value: zh-cn, zh-Hans, zh-hans, zh_Hans, zh_hans. Traditional Chinese is not supported. EN, ZH-CN, and bare zh are rejected. Omitted or blank defaults to en. This preference does not rewrite URL bytes, translate parameter names, or use the caller's location. Website routes stay /zh-cn."
  4. Changed3 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "alias": "notes",
      +    "idempotency_key": "example-create-1",
      +    "locale": "en",
      +    "title": "Notes",
      +    "url": "https://example.com/notes"
      +  }
      +]
    • addedInput schema / properties / locale / description
      Added value: +"Accepted values: en, zh-CN, and zh-cn (the only case fold of zh-CN). EN, ZH-CN, and bare zh are rejected. Omitted or blank defaults to en."
    • addedInput schema / properties / title / description
      Added value: +"Optional link title, at most 256 characters."
  5. Changed6 schema fields changed
    • changedInput schema / properties / alias / description
      Previous value: -"Optional ASCII alias [A-Za-z0-9_-], stored lowercase"New value: +"Optional custom path segment (stored lowercase). Do not send customSlug."
    • removedInput schema / properties / customSlug
      Removed value: -{
      -  "description": "Optional ASCII alias [A-Za-z0-9_-], stored lowercase",
      -  "maxLength": 32,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Idempotency key (same semantics as REST Idempotency-Key header)"New value: +"Client-generated unique key for this create. Required. Replays within 24h."
    • removedInput schema / properties / longUrl
      Removed value: -{
      -  "description": "http(s) destination URL — Soft C SSRF no-fetch applies",
      -  "maxLength": 2048,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / properties / url / description
      Previous value: -"http(s) destination URL — Soft C SSRF no-fetch applies"New value: +"Destination HTTPS/HTTP URL to shorten. Required. Do not send longUrl."
    • addedInput schema / required
      Added value: +[
      +  "url",
      +  "idempotency_key"
      +]
  6. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the description is not carrying the safety burden alone. It still adds real context beyond them: the account requirement and the returned state / display-URL behavior. It stops short of describing permissions, quota, or failure modes, so it is strong but not exhaustive.

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 routing constraint and the alternative are front-loaded ahead of the less critical return-value sentence. The bilingual mirroring roughly doubles the length, which is defensible given the explicit locale handling but costs some tightness. Every sentence carries content, with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-resource create tool, the description covers the account precondition, the sibling routing rule, idempotent retry behavior, and the return state; an output schema exists so return shape need not be spelled out. The only gap is failure/error behavior and any quota limits, which is minor against the annotation coverage.

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

Parameters3/5

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

Schema description coverage is 100%, so url, alias, title, locale, and idempotency_key are all documented in the schema itself, including alias lowercase normalization and locale canonicalization. The description only restates the idempotency_key reuse rule, adding little beyond the structured fields. Baseline 3 is correct.

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 ('Create one HTTP or HTTPS short link') with explicit scope (exactly one link, HTTP/HTTPS only), and it names the sibling that handles the multi-link case ('For two or more, use shorten_urls'). An agent can distinguish it from shorten_urls, create_qr, and resolve_short_url without opening any schema.

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?

Gives both a precondition ('A registered account is required') and an explicit alternative with its selecting condition ('For two or more, use shorten_urls'). It also states the retry rule ('A retry of the same operation must reuse the same idempotency_key'), which is the kind of action guidance that prevents duplicate links.

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.

Resources