Decoration and registration of tools, resources and prompts for classes #1694
anirbanbasu
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
FastMCP documentation provides some pointers to decorating methods that are either instance or class methods at: https://gofastmcp.com/patterns/decorating-methods.
Recently, I have been experimenting with automatic registration of tools, prompts and resources with a mixin pattern and decoration metadata provided as dictionaries. See the mixin class at https://github.com/anirbanbasu/pymcp/blob/master/src/pymcp/mixin.py and its subclass exposing the tools, prompts and resources at https://github.com/anirbanbasu/pymcp/blob/master/src/pymcp/server.py.
Would be nice to get feedback from the community. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions