Skip to main content
Glama
AlexGreenUK

XS Shlink MCP

by AlexGreenUK

set_redirect_rules

Idempotent

Replace the dynamic redirect rules for a Shlink short URL, setting custom routing based on conditions. Rules are processed in the order provided, enabling precise visitor redirection.

Instructions

Replace the dynamic redirect rules for a short URL. Rules are evaluated by Shlink in their provided order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoDomain when the short code is not on the default domain
shortCodeYesThe Shlink short code
redirectRulesYesShlink redirect-rule objects
Behavior4/5

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

The description adds the key behavioral detail that rules are evaluated in the provided order, which is critical for understanding how the redirectRules array is interpreted. Annotations already convey idempotency and non-destructiveness, so the order note provides extra value beyond the structured metadata. It does not mention other effects like replacing all existing rules, but 'Replace' already implies that.

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?

The description is two sentences long, with the core purpose in the first sentence and a critical behavioral note in the second. There is no redundant wording or unnecessary detail, making it highly efficient and front-loaded.

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

Completeness3/5

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

The tool handles a moderately complex mutation with an unstructured array parameter and no output schema. The description explains the core action and order semantics, but it omits information about the return value, potential validation, or the expected structure of redirect-rule objects. This leaves some gaps for an agent that needs to fully understand the operation's context.

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?

While the schema covers each parameter's basic meaning (domain, shortCode, redirectRules), the description adds semantic value by specifying that rule order matters, which informs how the redirectRules array should be constructed. This goes beyond the schema's generic 'Shlink redirect-rule objects' description, though it still leaves the rule object structure undefined.

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?

The description states a specific action ('Replace') on a clear resource ('dynamic redirect rules for a short URL'), which immediately distinguishes it from sibling tools like get_redirect_rules (retrieve) and set_domain_redirects (domain-level). The purpose is unambiguous and focused.

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

Usage Guidelines3/5

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

The description implies usage through the verb 'Replace' but does not explicitly state when to use this tool versus alternatives such as get_redirect_rules or set_domain_redirects. There is no exclusion or alternative guidance, but the context of 'short URL' and 'redirect rules' makes the primary use case clear enough for an agent to infer.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AlexGreenUK/XS-Shlink-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server