Compare performs deep equality checks between any two values — strings, numbers, objects, arrays, or mixed types. Use via MCP in Cursor or call GET /v1/misc/compare with value1 and value2 parameters. Returns boolean true/false with detailed comparison metadata. Handles nested structures and type coercion consistently.
curl "https://tinyfn.io/v1/misc/compare" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/misc/compare', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/misc/compare',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's miscellaneous tools:
{
"mcpServers": {
"tinyfn-misc": {
"url": "https://tinyfn.io/mcp/misc",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
It performs strict equality checking by default, so string '5' does not equal number 5. Use type coercion parameters to enable flexible comparisons across types.
Yes, the tool recursively compares all nested properties and array elements. It returns detailed metadata about which specific fields differ in complex structures.
This tool provides structured comparison results with metadata, handles edge cases consistently, and works across different programming contexts via MCP or REST API.
AI agents can validate data transformations, check API response consistency, or verify that generated content matches expected formats before proceeding with workflows.
Yes, it distinguishes between null, undefined, empty strings, empty objects, and empty arrays. Each is treated as a distinct value type in comparisons.