Ateş Göral
|
8d88156d71
|
Merge pull request #34 from koic/make_some_optional_kwargs_in_resource
Make `description` and `mime_type` optional keyword arguments in `Resource`
|
2025-05-31 13:34:25 -04:00 |
|
Koichi ITO
|
eb1c93909b
|
Make description and mime_type optional keyword arguments in Resource
This change is related to #29.
According to the specification, both `description` and `mimeType` of Resource are optional:
https://modelcontextprotocol.io/specification/2025-03-26/server/resources#resource
Therefore, it makes sense to treat them as optional keyword arguments,
similar to how this is done in `ResourceTemplate`:
https://github.com/modelcontextprotocol/ruby-sdk/blob/0b49c3/lib/mcp/resource_template.rb#L8
As additional context, the TypeScript SDK also treats them as optional.
https://github.com/modelcontextprotocol/typescript-sdk/blob/1.12.1/src/types.ts#L438-L466
|
2025-05-31 01:24:23 +09:00 |
|
Koichi ITO
|
2f354a872a
|
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
|
2025-05-30 10:41:18 +09:00 |
|
Topher Bullock
|
9d2447b351
|
rename lib/{model_context_protocol => mcp}
|
2025-05-29 17:11:40 -04:00 |
|