diff --git a/docs/first-server/python.mdx b/docs/first-server/python.mdx index 3ee2f80..1c36727 100644 --- a/docs/first-server/python.mdx +++ b/docs/first-server/python.mdx @@ -638,18 +638,15 @@ uvicorn.run(app, host="0.0.0.0", port=8000) ```python - @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" - ) - ] - ) + @app.list_resource_templates() + async def list_resource_templates() -> list[ResourceTemplate]: + return [ + ResourceTemplate( + uriTemplate="weather://{city}/current", + name="Current weather for any city", + mimeType="application/json" + ) + ] ```