Data Processing
Remove values from array that are present in other arrays using lodash _.difference
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/difference-arrays' \
-H 'Content-Type: application/json' \
-d '{"array":"[2, 1, 2, 3]","exclude1":"[2, 3]","exclude2":"[4, 5]","exclude3":"[6, 7]","caseSensitive":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/difference-arrays| Name | Type | Required | Description |
|---|---|---|---|
| array | textarea | Yes | — |
| exclude1 | textarea | Yes | Values to exclude from source array |
| exclude2 | textarea | No | Additional values to exclude (optional) |
| exclude3 | textarea | No | More values to exclude (optional) |
| caseSensitive | checkbox | No | For string comparison, uncheck for case-insensitive matching |
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-difference-arrays": {
"name": "difference-arrays",
"description": "Remove values from array that are present in other arrays using lodash _.difference",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=difference-arrays",
"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": "difference-arrays",
"arguments": {
"array": "[2, 1, 2, 3]",
"exclude1": "[2, 3]",
"exclude2": "[4, 5]",
"exclude3": "[6, 7]",
"caseSensitive": true
}
}
}Questions or issues? Contact [email protected]
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}