Categories

Chunk Array

Split array into chunks of specified size using lodash _.chunk

Split any array into smaller chunks (sub-arrays) of a specified size. ## Features: - Accepts JSON arrays (numbers, strings, objects, or mixed types) - Customizable chunk size (1-100 elements) - Uses lodash _.chunk for reliable array processing - Preserves array element types ## Examples: - Input: [1, 2, 3, 4, 5], Size: 2 → [[1, 2], [3, 4], [5]] - Input: ["a", "b", "c", "d", "e"], Size: 3 → [["a", "b", "c"], ["d", "e"]] - Input: [1, "a", 2, "b"], Size: 2 → [[1, "a"], [2, "b"]] ## Use Cases: - **Batch Processing**: Process arrays in batches for API calls - **Pagination**: Split data into page-sized chunks - **Data Organization**: Group related array elements - **Memory Management**: Process large arrays in smaller pieces

Enter a valid JSON array to chunk

Number of elements per chunk (1-100)

API Documentation

Request Endpoint

POST /en/api/tools/chunk-array

Request Parameters

Parameter Name Type Required Description
array textarea Yes Enter a valid JSON array to chunk
size number No Number of elements per chunk (1-100)

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-chunk-array": {
      "name": "chunk-array",
      "description": "Split array into chunks of specified size using lodash _.chunk",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=chunk-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]