Skip to main content
Glama

shorten_urls

Bulk-create multiple short links in one call with optional custom slugs and UTM parameters. Failed entries are reported separately without blocking other links.

Instructions

Create several short links in one call. Each item follows the same rules as shorten_url. Items that fail do not stop the others: the response lists the created links and the errors separately.

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": {
      "urls": "<urls>"
    },
    "name": "shorten_urls"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYesLinks to create, one object per link.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.0.5
    • addedInput schema / properties / urls / description
      Added value: +"Links to create, one object per link."
    • addedInput schema / properties / urls / items / properties / destination / description
      Added value: +"Full http(s) URL to redirect to."
    • addedInput schema / properties / urls / items / properties / slug / description
      Added value: +"Custom slug. A random one is used when omitted."
    • addedInput schema / properties / urls / items / properties / utm_campaign / description
      Added value: +"UTM campaign name. Added to the destination URL."
    • addedInput schema / properties / urls / items / properties / utm_content / description
      Added value: +"UTM content (ad or link variant). Added to the destination URL."
    • addedInput schema / properties / urls / items / properties / utm_medium / description
      Added value: +"UTM medium, e.g. email. Added to the destination URL."
    • addedInput schema / properties / urls / items / properties / utm_source / description
      Added value: +"UTM source, e.g. newsletter. Added to the destination URL."
    • addedInput schema / properties / urls / items / properties / utm_term / description
      Added value: +"UTM term (paid keyword). Added to the destination URL."
  2. First observedv1.0.4

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already disclose that this is a non-destructive write with open-world effects, so the lower bar applies. The description adds genuinely non-obvious behavior: partial failure is tolerated per item and the response separates successes from errors, which an agent cannot infer from the annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with the batch capability front-loaded, then the per-item rule reference, then the failure semantics. Every sentence carries distinct information and none repeats the schema.

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 one-parameter batch write with no output schema, the description covers the two things an agent must know: per-item equivalence to shorten_url and the partial-failure response shape. Minor omissions are batch size limits and auth requirements, but nothing essential to invoking it correctly is missing.

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% and every nested field (destination, slug, utm_*) is documented inline, so the schema does the heavy lifting. The description only adds a cross-reference that item-level rules match shorten_url, which is helpful orientation but adds no field-level meaning beyond the schema.

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 several short links') and makes the batch scope explicit ('in one call'), which distinguishes it from the single-item sibling shorten_url without needing to inspect either schema.

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

Usage Guidelines4/5

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

Implies the selection condition clearly (multiple links at once vs. the single-link sibling) and routes per-item behavior to shorten_url. It does not state an explicit when-not to use this tool, e.g. a batch-size ceiling, but the context is unambiguous.

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