generate_nanoid
Generate compact, URL-safe unique identifiers (Nano IDs) for URLs, tokens, or database keys. Customize length and alphabet for collision-resistant IDs.
Instructions
Generate Nano ID strings — compact, URL-safe unique identifiers.
Use this for short unique IDs suitable for URLs, tokens, or database keys.
Nano IDs are URL-friendly, collision-resistant, and customizable.
Parameters:
length — Length of each Nano ID (default: 21).
alphabet — Custom alphabet string (optional). Default uses A-Za-z0-9_-.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_nanoid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| length | No | ||
| alphabet | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |