Utility-Tools (Zeit, Calc, Random)
Öffentliche Utility-Endpunkte — Serverzeit, sicherer Taschenrechner, Zufallswert-Generator. Keine Auth erforderlich.
Utility-Tools
Die /tools-Endpunkte sind öffentliche Hilfswerkzeuge — keine Authentifizierung
erforderlich. Sie sind nützlich für LLM-Agenten, die serverseitige Zeit, sichere
Mathe oder Zufallswerte brauchen.
GET /tools/time
Aktuelle Serverzeit, Zeitzone und UTC-Offset abrufen.
curl https://synapse.schaefer.zone/tools/timeAntwort:
{
"time": "2026-06-27T14:30:00.000Z",
"timezone": "Europe/Berlin",
"offset": 120
}Anwendungsfall: LLM-Agenten, die „wie spät ist es jetzt" für Scheduling, Zeitstempel oder relative Datenberechnungen wissen müssen.
GET /tools/calc
Sicherer Taschenrechner — nur Arithmetik, kein eval(). Unterstützt +, -,
*, /, %, (, ) und Zahlen.
curl "https://synapse.schaefer.zone/tools/calc?expr=(10+5)*3"Antwort:
{
"result": 45,
"expr": "(10+5)*3"
}Verwende das statt Mathe im Kopf oder via String-Parsing. Es ist sicher
(keine Code-Injection möglich) und präzise.
Unterstützte Operatoren
+Addition-Subtraktion*Multiplikation/Division%Modulo()Klammern- Zahlen (ganzzahlig und dezimal)
Beispiele
curl ".../tools/calc?expr=2+2" # → 4
curl ".../tools/calc?expr=3.14*100" # → 314
curl ".../tools/calc?expr=100%7" # → 2
curl ".../tools/calc?expr=(2+3)*4-1" # → 19GET /tools/random
Zufallswerte generieren.
# UUID v4
curl "https://synapse.schaefer.zone/tools/random?type=uuid"
# → { "value": "a1b2c3d4-...", "type": "uuid" }
# Integer (default range 0-100)
curl "https://synapse.schaefer.zone/tools/random?type=int&min=1&max=10"
# → { "value": 7, "type": "int" }
# Float
curl "https://synapse.schaefer.zone/tools/random?type=float&min=0&max=1"
# → { "value": 0.7234, "type": "float" }
# Hex string
curl "https://synapse.schaefer.zone/tools/random?type=hex&min=8&max=16"
# → { "value": "a3f7b2c1", "type": "hex" }
# Alphabetic string
curl "https://synapse.schaefer.zone/tools/random?type=alpha&min=8&max=12"
# → { "value": "kQmzPwXn", "type": "alpha" }Typ-Parameter
| Typ | Parameter | Ausgabe |
|---|---|---|
uuid |
keine | UUID-v4-String |
int |
min, max (Standard 0-100) |
Integer |
float |
min, max (Standard 0-100) |
Float |
hex |
min, max (Längenbereich, Standard 8-16) |
Hex-String |
alpha |
min, max (Längenbereich, Standard 8-16) |
Alphabetischer String |
Anwendungsfälle für LLM-Agenten
Eindeutige IDs generieren
ID=$(curl -s .../tools/random?type=uuid | jq -r .value)
curl -X POST .../memory -d "{\"key\": \"task_$ID\", ...}"Prozentwerte berechnen
TOTAL=142
DONE=87
PERCENT=$(curl -s ".../tools/calc?expr=($DONE*100)/$TOTAL" | jq -r .result)
echo "Progress: $PERCENT%"Aktuellen Zeitstempel abrufen
NOW=$(curl -s .../tools/time | jq -r .time)
curl -X POST .../var -d "{\"key\": \"last_run\", \"value\": \"$NOW\"}"Testdaten generieren
for i in {1..10}; do
NAME=$(curl -s ".../tools/random?type=alpha&min=5&max=10" | jq -r .value)
curl -X POST .../memory -d "{\"key\": \"test_$i\", \"content\": \"$NAME\"}"
doneNächste Schritte
- API-Übersicht — alle Endpunkt-Gruppen
- Errors & Fehlerbehandlung