We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d7e24f commit 972ba23Copy full SHA for 972ba23
src/agents/mcp/server.py
@@ -376,12 +376,7 @@ async def read_resource(self, uri: str) -> ReadResourceResult:
376
"""Read a specific resource from the server."""
377
if not self.session:
378
raise UserError("Server not initialized. Make sure you call `connect()` first.")
379
-
380
- from pydantic import AnyUrl
381
382
- # Convert string to AnyUrl if needed
383
- uri_obj = AnyUrl(uri) if isinstance(uri, str) else uri
384
- return await self.session.read_resource(uri_obj)
+ return await self.session.read_resource(uri) # type: ignore[arg-type]
385
386
async def cleanup(self):
387
"""Cleanup the server."""
0 commit comments