URL & Slug MCP Tools for AI Agents

Your CMS agent converts "Héllo Wörld — A Guide!" to a URL slug and produces "hello-world-a-guide" but misses the dash before "a" or double-encodes special characters. Slugification has specific rules for Unicode, whitespace, and special characters. These tools handle all edge cases.

All URL/Slug Tools (14)

Your agent gets access to 14 url/slug tools via the /mcp/slug/ endpoint. Here's the complete list:

ToolDescription
slug/slugifySlugify
slug/deslugifyDeslugify
slug/is-valid-slugIs Valid Slug
slug/url-encodeUrl Encode
slug/url-decodeUrl Decode
slug/parse-urlParse Url
slug/build-urlBuild Url
slug/normalize-urlNormalize Url
slug/extract-domainExtract Domain
slug/is-valid-urlIs Valid Url
slug/join-pathJoin Path
slug/add-query-paramAdd Query Param
slug/remove-query-paramRemove Query Param
slug/filename-safeFilename Safe

Agent Scenarios

Here's how real agents use these tools:

1. CMS publishing agent

A content agent generates URL slugs from article titles, handling Unicode and special characters correctly.

Tool Call: slug/slugify
{ "text": "10 Tips & Tricks for Better Code!" }

2. E-commerce agent

A product catalog agent creates clean product URLs from product names with proper character handling.

Tool Call: slug/slugify
{ "text": "Café Latte — Grande (16oz)" }

MCP Setup

Add url/slug tools to your agent in under 2 minutes. Choose your client:

Claude Desktop / Claude Code

Add this to your MCP config:

{
  "mcpServers": {
    "tinyfn-slug": {
      "url": "https://api.tinyfn.io/mcp/slug/",
      "headers": {
        "X-API-Key": "your-api-key"
      }
    }
  }
}

Cursor

Go to Settings > MCP and add a new server:

  • Type: SSE
  • URL: https://api.tinyfn.io/mcp/slug/sse
  • Headers: X-API-Key: your-api-key

Tip: Use the category-specific endpoint (/mcp/slug/) for the best experience. The all-in-one endpoint (/mcp/all/) works too but has 500+ tools which some clients handle less efficiently.

When to Use These Tools

Use url/slug MCP tools when your agent needs to:

  • Guarantee correctness — when wrong answers have real consequences
  • Process user data — when you're operating on actual user input, not hypothetical examples
  • Maintain consistency — when the same input must always produce the same output

You don't need these tools for casual conversation or rough estimates. Use them when precision matters.

Ready to add url/slug tools to your agent?

Get Free API Key 100 requests/month free. No credit card required.

Frequently Asked Questions

What makes slugification tricky for LLMs?

Slugification involves Unicode normalization, accent stripping, special character removal, whitespace collapsing, and consistent hyphenation. LLMs may handle simple cases but fail on edge cases with accented characters or unusual punctuation.

Does TinyFn handle non-Latin characters?

Yes. TinyFn properly transliterates accented characters (é→e, ü→u) and handles CJK characters, producing clean ASCII slugs from any input.

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key