The new Attributes Support for MCP Servers is awesome. I have a question, how to let MCP tool returns an image (JPEG or PNG)?
This depends on how your client expects to deal with the image. Two obvious choices:
- Base64 encoded string payload (for small images)
- Image URI (for large images or if your client expects the image this way)