async def test_list_tools(client: BasicMCPClient):
    """Test listing tools from the server."""
    tools = await client.list_tools()

    # Check that we got a list of tools
    assert isinstance(tools, types.ListToolsResult)
    assert len(tools.tools) > 0

    # Verify some expected tools are present
    tool_names = [tool.name for tool in tools.tools]
    assert "echo" in tool_names
    assert "add" in tool_names
    assert "get_time" in tool_names
Test listing tools from the server.
llama-index-integrations/tools/llama-index-tools-mcp/tests/test_client.py