Array Dedupe removes duplicate values from arrays, returning only unique elements in their original order. Use via MCP in Cursor or Windsurf, or call GET /v1/array/dedupe with your array data. Perfect for cleaning datasets before analysis — handles strings, numbers, and mixed types deterministically without the ambiguity of LLM-generated deduplication logic.
curl "https://tinyfn.io/v1/array/dedupe" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/array/dedupe', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/array/dedupe',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's array tools:
{
"mcpServers": {
"tinyfn-array": {
"url": "https://tinyfn.io/mcp/array",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Array Dedupe keeps the first occurrence of each unique value and removes subsequent duplicates, maintaining the original sequence of first appearances.
Yes, it handles mixed types by comparing values exactly — '5' (string) and 5 (number) are treated as distinct elements.
Use the 'array_dedupe' MCP tool in Cursor, Claude Code, or other supported editors to remove duplicates from arrays in your code.
It works with any JSON-serializable data including nested objects, comparing them by their complete structure and content.
TinyFn's implementation handles edge cases consistently across all data types and provides guaranteed deterministic results, unlike ad-hoc deduplication logic that might miss corner cases.
Get your free API key and start using Array Dedupe in seconds.
Get Free API Key