Suppress redundant attributes in Resources

According to the specification, the following attributes are optional,
so using `compact` ensures consistency.

- `description`: Optional description
- `mimeType`: Optional MIME type
- `size`: Optional size in bytes

https://modelcontextprotocol.io/specification/2025-03-26/server/resources#resource
This commit is contained in:
Koichi ITO 2025-05-29 02:04:08 +09:00
commit 2f354a872a

View file

@ -18,7 +18,7 @@ module MCP
name: @name,
description: @description,
mimeType: @mime_type,
}
}.compact
end
end
end