Remove By Predicate
Remove items that match a predicate using lodash _.remove
Remove items from an array when they match the selected predicate.
**Highlights:**
- Uses lodash `_.remove`
- Supports numeric and string comparisons
- Returns the remaining array as JSON
**Example:**
- Array: `[1, 2, 3, 4]`
- Predicate: `greater-than`
- Compare: `2`
- Result: `[1, 2]`
API Documentation
Request Endpoint
POST /en/api/tools/remove-by-predicate
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| array | textarea | Yes | Enter a JSON array |
| predicateType | select | Yes | Select the condition for removal |
| compareValue | text | No | Value to compare against (required for most predicates) |
Response Format
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
Text:
Text
AI MCP Documentation
Add this tool to your MCP server configuration:
{
"mcpServers": {
"elysiatools-remove-by-predicate": {
"name": "remove-by-predicate",
"description": "Remove items that match a predicate using lodash _.remove",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=remove-by-predicate",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.
If you encounter any issues, please contact us at [email protected]