Skip to content

Fix Resource::Embedded not setting @resource in initialize#220

Merged
koic merged 1 commit intomodelcontextprotocol:mainfrom
koic:fix_resource_embedded_not_setting_resource_in_initialize
Feb 4, 2026
Merged

Fix Resource::Embedded not setting @resource in initialize#220
koic merged 1 commit intomodelcontextprotocol:mainfrom
koic:fix_resource_embedded_not_setting_resource_in_initialize

Conversation

@koic
Copy link
Member

@koic koic commented Jan 26, 2026

Motivation and Context

The initialize method was missing the assignment of @resource, causing the resource method to always return nil and to_h to return an incorrect hash with an empty resource value.

How Has This Been Tested?

Added comprehensive tests to verify the fix and prevent regression.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

The `initialize` method was missing the assignment of `@resource`,
causing the resource method to always return `nil` and `to_h` to return
an incorrect hash with an empty resource value.

Added comprehensive tests to verify the fix and prevent regression.
@koic koic merged commit 248c1ec into modelcontextprotocol:main Feb 4, 2026
10 checks passed
@koic koic deleted the fix_resource_embedded_not_setting_resource_in_initialize branch February 4, 2026 01:58
@koic koic mentioned this pull request Feb 14, 2026
5 tasks
koic added a commit that referenced this pull request Feb 14, 2026
Some new features and fixes have been added, and it seems like a good time to cut a release.

- #103
- #223
- #218
- #221
- #225
- #224
- #220

For now, the features completed so far can be included in this release,
and subsequent feature proposals can continue to be incorporated into future releases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants