Skip to content

Conversation

@ochafik
Copy link
Collaborator

@ochafik ochafik commented Dec 16, 2025

Summary

Following the MCP TS SDK convention where request methods don't have the "send" prefix (reserved for notifications):

  • App.sendOpenLink()App.openLink()
  • AppBridge.sendResourceTeardown()AppBridge.teardownResource()

The old method names are kept as deprecated aliases for backwards compatibility.

Changes

  • Renamed request methods in App and AppBridge classes
  • Added @deprecated aliases for old method names
  • Updated all examples to use new method names
  • Updated README documentation links

Backwards Compatibility

Non-breaking change - deprecated aliases ensure existing code continues to work.

🤖 Generated with Claude Code

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 16, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@161

commit: 4299e9f

Following the MCP TS SDK convention where request methods don't have
the "send" prefix (reserved for notifications):

- App.sendMessage() → App.message()
- App.sendOpenLink() → App.openLink()
- AppBridge.sendResourceTeardown() → AppBridge.resourceTeardown()

The old method names are kept as deprecated aliases for backwards
compatibility.

Updated all examples to use the new method names.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ochafik ochafik force-pushed the ochafik/rename-request-methods branch from 3292924 to a11a022 Compare December 16, 2025 14:51
- Update existing tests to use new method names (message, openLink)
- Add tests verifying deprecated aliases are same reference as new methods
- Add tests verifying deprecated aliases still work functionally

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ochafik ochafik requested review from antonpk1 and jonathanhefner and removed request for jonathanhefner December 16, 2025 15:20
@ochafik ochafik marked this pull request as ready for review December 16, 2025 15:20
jonathanhefner
jonathanhefner previously approved these changes Dec 16, 2025
Copy link
Member

@jonathanhefner jonathanhefner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought is that this convention only works when the method name already contains a verb. For example, openLink() works, but resourceTeardown() doesn't quite work — it would need to be teardownResource(). And message() is very borderline.

But I will defer to you.

- App.message() → App.sendMessage() (with deprecated message alias)
- AppBridge.resourceTeardown() → AppBridge.teardownResource() (with deprecated aliases)

This better follows the pattern where methods that send data have 'send' or action verb prefix.
@ochafik
Copy link
Collaborator Author

ochafik commented Dec 16, 2025

Thanks @jonathanhefner! As discussed offline:

  • message()sendMessage() (the "send" prefix makes the action clearer, and it's an exception to the 'no send' for requests rule that's better than the borderline message)
  • resourceTeardown()teardownResource() (verb-first as you suggested)

@ochafik ochafik merged commit 2dd223b into main Dec 16, 2025
11 of 17 checks passed
@ochafik ochafik mentioned this pull request Dec 16, 2025
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.

3 participants