Design
Convert images to binary (black and white) with customizable threshold and options
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-binary' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/es/api/tools/image-binary' \
-F 'imageFile=/path/to/file.ext' \
-F 'threshold=128' \
-F 'invert=false'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/image-binary| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| imageFile | filesubida requerida | Sí | — |
| threshold | number | Sí | Pixels with value >= threshold become white, others become black |
| invert | checkbox | No | If checked, black and white colors will be inverted |
Resultado de archivo
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-image-binary": {
"name": "image-binary",
"description": "Convert images to binary (black and white) with customizable threshold and options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-binary",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-binary",
"arguments": {
"imageFile": "https://example.com/file.ext",
"threshold": 128,
"invert": false
}
}
}¿Dudas o problemas? Contacta con [email protected]