Data Processing
Find the first matching key using lodash _.findKey
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/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}"}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/find-key| Name | Type | Required | Description |
|---|---|---|---|
| objectInput | textarea | Yes | Enter a JSON object |
| predicateType | select | No | — |
| predicateProperty | text | No | Truthy property name when using property predicate |
| matchPath | text | No | Property path for matchesProperty |
| matchValue | textarea | No | JSON value to match |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-find-key": {
"name": "find-key",
"description": "Find the first matching key using lodash _.findKey",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=find-key",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"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}"
}
}
}Questions or issues? Contact [email protected]
| matchObject | textarea | No | JSON object to match |
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}