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:
parent
91219d30b7
commit
2f354a872a
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ module MCP
|
|||
name: @name,
|
||||
description: @description,
|
||||
mimeType: @mime_type,
|
||||
}
|
||||
}.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue