Defaults Object
Apply default values to an object using lodash _.defaults
Assign default values for undefined properties on the target object.
**Highlights:**
- Uses lodash `_.defaults`
- Only fills in undefined properties
- Later sources are applied first
**Example:**
- Target: `{"a":1}`
- Source 1: `{"a":2,"b":2}`
- Result: `{"a":1,"b":2}`
API Documentation
Request Endpoint
POST /en/api/tools/defaults-object
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| targetObject | textarea | Yes | Enter the target JSON object |
| source1 | textarea | Yes | First source object |
| source2 | textarea | No | Optional source object |
| source3 | textarea | No | Optional source object |
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-defaults-object": {
"name": "defaults-object",
"description": "Apply default values to an object using lodash _.defaults",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=defaults-object",
"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]