How to use tools from the client
ToolListChangedNotification
, it signals that the tool list has changed. The list_tools()
method always fetches fresh data from the server, ensuring you get up-to-date information.
Important: Always use await session.list_tools()
instead of the deprecated session.tools
property to ensure you get fresh data:
call_tool
method:
CallToolResult
object with:
content
: The result data or error messageisError
: Boolean indicating success or failure