Categories

Slice Array

Extract a section of an array using lodash _.slice

Slice a JSON array using start and end indices. **Highlights:** - Uses lodash `_.slice` - Supports negative indices - Returns the sliced array as JSON **Example:** - Array: `["a", "b", "c", "d"]` - Start: `1` - End: `3` - Result: `["b", "c"]`

Enter a JSON array

Index to start slicing (supports negative)

Index to stop slicing (exclusive)

API Documentation

Request Endpoint

POST /en/api/tools/slice-array

Request Parameters

Parameter Name Type Required Description
array textarea Yes Enter a JSON array
start number No Index to start slicing (supports negative)
end number No Index to stop slicing (exclusive)

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-slice-array": {
      "name": "slice-array",
      "description": "Extract a section of an array using lodash _.slice",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=slice-array",
      "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]