Design
Extract a specific region from an image using precise X, Y coordinates and dimensions
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-extract-coordinates' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-extract-coordinates' \
-F 'imageFile=/path/to/file.ext' \
-F 'coordinateSystem=top-left' \
-F 'x=0' \
-F 'y=0' \
-F 'width=100' \
-F 'height=100' \
-F 'validateBounds=true' \
-F 'format=original' \
-F 'quality=90'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/image-extract-coordinates| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | Upload any image file (JPEG, PNG, WebP, TIFF) for coordinate-based extraction |
| coordinateSystem | select | Yes | Choose the coordinate system for specifying the region |
| x | number | Yes | X position. For center system: offset from center. For percentage: 0-100% |
| y | number | Yes | Y position. For center system: offset from center. For percentage: 0-100% |
| width |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-image-extract-coordinates": {
"name": "image-extract-coordinates",
"description": "Extract a specific region from an image using precise X, Y coordinates and dimensions",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-extract-coordinates",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-extract-coordinates",
"arguments": {
"imageFile": "https://example.com/file.ext",
"coordinateSystem": "top-left",
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"validateBounds": true,
"format": "original",
"quality": 90
}
}
}| number |
| Yes |
| Width of region to extract. For percentage mode: 0-100% |
| height | number | Yes | Height of region to extract. For percentage mode: 0-100% |
| validateBounds | checkbox | No | Automatically adjust region if it exceeds image boundaries |
| format | select | No | Choose output format or keep original |
| quality | number | No | Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size |
File result
{
"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)"
}Questions or issues? Contact [email protected]