In 5th step of python sdk advanced features there is explanation how to use resource templates
@self.list_resources()
async def list_resources(self) -> ListResourcesResult:
return ListResourcesResult(
resources=[...],
resourceTemplates=[
ResourceTemplate(
uriTemplate="weather://{city}/current",
name="Current weather for any city",
mimeType="application/json"
)
]
)
Which is wrong because ListResourcesResult does not accept resourceTemplates
ListResourcesResult implementation
Also there is no option to use ListResourceTemplatesResult separately, because there is no Server.list_resource_templates in order to use it as decorator
In 5th step of python sdk advanced features there is explanation how to use resource templates
Which is wrong because
ListResourcesResultdoes not acceptresourceTemplatesListResourcesResult implementation
Also there is no option to use
ListResourceTemplatesResultseparately, because there is noServer.list_resource_templatesin order to use it as decorator