MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / create_thumbnail

Function create_thumbnail

examples/snippets/servers/images.py:11–15  ·  view source on GitHub ↗

Create a thumbnail from an image

(image_path: str)

Source from the content-addressed store, hash-verified

9
10@mcp.tool()
11def 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")

Callers

nothing calls this directly

Calls 1

ImageClass · 0.90

Tested by

no test coverage detected