Generator
Génère des identifiants modernes : ULID, NanoID, Snowflake et CUID2. Comparez les formats, décodez l'horodatage ULID.
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/uid-generator' \
-H 'Content-Type: application/json' \
-d '{"type":"ulid","count":5,"length":0,"workerId":1,"datacenterId":1,"epoch":0,"compareUlid":"Paste a ULID to decode its timestamp instead of generating"}'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/uid-generator| Nom | Type | Requis | Description |
|---|---|---|---|
| type | select | Oui | — |
| count | number | Non | — |
| length | number | Non | ID length for NanoID and CUID2. Ignored for ULID/Snowflake. |
| workerId | number | Non | Machine/worker id within the datacenter (Snowflake only). |
| datacenterId | number | Non | Datacenter id for distributed deployments (Snowflake only). |
Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-uid-generator": {
"name": "uid-generator",
"description": "Génère des identifiants modernes : ULID, NanoID, Snowflake et CUID2. Comparez les formats, décodez l'horodatage ULID.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=uid-generator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "uid-generator",
"arguments": {
"type": "ulid",
"count": 5,
"length": 0,
"workerId": 1,
"datacenterId": 1,
"epoch": 0,
"compareUlid": "Paste a ULID to decode its timestamp instead of generating"
}
}
}Des questions ou un problème ? Contactez [email protected]
| epoch | number | Non | Base epoch in ms. Defaults to Twitter epoch (1288834974657). Snowflake only. |
| compareUlid | text | Non | When filled, the tool decodes this ULID and ignores other options. |
Résultat texte
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}