Description
MCPServer and ResourceManager have add_resource() method for static Resources, but there is no way to handle ResourceTemplate without using @resource decorator.
I am implementing the following workaround using the decorator for my usecase, but it is a bit odd.
server = MCPServer("...")
# Configure resources (implemented in other files)
server.resource("resource://users")(resources.list_users)
server.resource("resource://users/{id}")(resources.get_user)
References
It was implemented in #3208.
Description
MCPServerandResourceManagerhaveadd_resource()method for staticResources, but there is no way to handleResourceTemplatewithout using@resourcedecorator.I am implementing the following workaround using the decorator for my usecase, but it is a bit odd.
References
It was implemented in #3208.