Constructs URLs from separate components like protocol, host, path, and query parameters. Access via MCP in Cursor or Windsurf, or REST API at GET /v1/slug/build-url. Pass components as parameters to get back a properly formatted URL string. Handles encoding, trailing slashes, and parameter serialization automatically.
curl "https://tinyfn.io/v1/slug/build-url" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/slug/build-url', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/slug/build-url',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's url/slug tools:
{
"mcpServers": {
"tinyfn-slug": {
"url": "https://tinyfn.io/mcp/slug",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Pass query parameters as key-value pairs and the tool automatically encodes them into the URL query string with proper formatting and encoding.
Yes, AI agents in Cursor, Claude Code, and other MCP-enabled editors can build URLs programmatically for API calls, webhooks, or redirect URLs.
Yes, it properly URL-encodes special characters in paths, query parameters, and fragments according to RFC standards.
The tool typically defaults to 'https://' if no protocol is specified, but check the specific parameter requirements for your use case.
Yes, you can include fragment components and the tool will append them correctly with the # symbol and proper encoding.