Data Processing
Trouve la premiere cle avec lodash _.findKey
Appelez cet outil depuis votre code en trois langages.
curl -X POST 'https://api.elysiatools.com/fr/api/tools/find-key' \
-H 'Content-Type: application/json' \
-d '{"objectInput":"{\"a\":{\"active\":false},\"b\":{\"active\":true}}","predicateType":"property","predicateProperty":"active","matchPath":"active","matchValue":"true","matchObject":"{\"active\":true}"}'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/find-key| Nom | Type | Requis | Description |
|---|---|---|---|
| objectInput | textarea | Oui | Entrez un objet JSON |
| predicateType | select | Non | — |
| predicateProperty | text | Non | Nom de propriete truthy pour le predicat property |
| matchPath | text | Non | Chemin de propriete pour matchesProperty |
| matchValue | textarea | Non |
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-find-key": {
"name": "find-key",
"description": "Trouve la premiere cle avec lodash _.findKey",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=find-key",
"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": "find-key",
"arguments": {
"objectInput": "{\"a\":{\"active\":false},\"b\":{\"active\":true}}",
"predicateType": "property",
"predicateProperty": "active",
"matchPath": "active",
"matchValue": "true",
"matchObject": "{\"active\":true}"
}
}
}Des questions ou un problème ? Contactez [email protected]
| Valeur JSON a faire correspondre |
| matchObject | textarea | Non | Objet JSON a faire correspondre |
Résultat texte
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}