Skip to content

note_upload_body_image: WebP upload fails with 400 invalid_param (note.com API limitation?) #264

Description

@katanumahotori

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:

  1. Auto-convert webp → JPEG/PNG before upload (Pillow), or
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions