Summary
Uploading a .webp file via note_upload_body_image fails with:
API request failed with status 400. Response: {"error":{"message":"不正なリクエストです","type":"invalid_param"}}
The MCP itself allows webp (ALLOWED_EXTENSIONS includes .webp and the content type map is correct), so this appears to be a note.com API limitation on body-image uploads. Interestingly, the eyecatch endpoint accepted a PNG fine; I did not test webp eyecatch.
Repro (2026-06-10): note_upload_body_image(file_path="photo.webp", note_id=...) → 400. Converting the same image to JPEG and re-uploading succeeded.
Suggestion
Either:
- Auto-convert webp → JPEG/PNG before upload (Pillow), or
- Remove
.webp from ALLOWED_EXTENSIONS for body images and raise a clear error telling the user to convert,
so users don't hit an opaque 400.
Summary
Uploading a
.webpfile vianote_upload_body_imagefails with:The MCP itself allows webp (
ALLOWED_EXTENSIONSincludes.webpand the content type map is correct), so this appears to be a note.com API limitation on body-image uploads. Interestingly, the eyecatch endpoint accepted a PNG fine; I did not test webp eyecatch.Repro (2026-06-10):
note_upload_body_image(file_path="photo.webp", note_id=...)→ 400. Converting the same image to JPEG and re-uploading succeeded.Suggestion
Either:
.webpfromALLOWED_EXTENSIONSfor body images and raise a clear error telling the user to convert,so users don't hit an opaque 400.