@@ -297,7 +297,7 @@ async def list_tools(
297297 async def call_tool (self , tool_name : str , arguments : dict [str , Any ] | None ) -> CallToolResult :
298298 """Invoke a tool on the server."""
299299 if not self .session :
300- raise UserError ("Server not initialized. Make sure you call connect() first." )
300+ raise UserError ("Server not initialized. Make sure you call ` connect()` first." )
301301
302302 return await self .session .call_tool (tool_name , arguments )
303303
@@ -306,7 +306,7 @@ async def list_prompts(
306306 ) -> ListPromptsResult :
307307 """List the prompts available on the server."""
308308 if not self .session :
309- raise UserError ("Server not initialized. Make sure you call connect() first." )
309+ raise UserError ("Server not initialized. Make sure you call ` connect()` first." )
310310
311311 return await self .session .list_prompts ()
312312
@@ -315,14 +315,14 @@ async def get_prompt(
315315 ) -> GetPromptResult :
316316 """Get a specific prompt from the server."""
317317 if not self .session :
318- raise UserError ("Server not initialized. Make sure you call connect() first." )
318+ raise UserError ("Server not initialized. Make sure you call ` connect()` first." )
319319
320320 return await self .session .get_prompt (name , arguments )
321321
322322 async def list_resources (self , cursor : str | None = None ) -> ListResourcesResult :
323323 """List the resources available on the server."""
324324 if not self .session :
325- raise UserError ("Server not initialized. Make sure you call connect() first." )
325+ raise UserError ("Server not initialized. Make sure you call ` connect()` first." )
326326
327327 return await self .session .list_resources (cursor )
328328
@@ -331,14 +331,14 @@ async def list_resource_templates(
331331 ) -> ListResourceTemplatesResult :
332332 """List the resources templates available on the server."""
333333 if not self .session :
334- raise UserError ("Server not initialized. Make sure you call connect() first." )
334+ raise UserError ("Server not initialized. Make sure you call ` connect()` first." )
335335
336336 return await self .session .list_resource_templates (cursor )
337337
338338 async def read_resource (self , uri : AnyUrl ) -> ReadResourceResult :
339339 """Read a specific resource given its uri."""
340340 if not self .session :
341- raise UserError ("Server not initialized. Make sure you call connect() first." )
341+ raise UserError ("Server not initialized. Make sure you call ` connect()` first." )
342342
343343 return await self .session .read_resource (uri )
344344
0 commit comments