Create a thumbnail from an image
(image_path: str)
| 9 | |
| 10 | @mcp.tool() |
| 11 | def create_thumbnail(image_path: str) -> Image: |
| 12 | """Create a thumbnail from an image""" |
| 13 | img = PILImage.open(image_path) |
| 14 | img.thumbnail((100, 100)) |
| 15 | return Image(data=img.tobytes(), format="png") |